I am trying to make the thickness of the ticks equal to the axis line thickness. That is what I have so far:



        xlabel=Binding Energy (eV),
        ylabel=Intensity (a.\,u.),
        xtick pos=left,
        x dir= reverse,
        ytick = \empty,
        every x tick/.style={color=black, thin},
        tick align=outside,
        xlabel near ticks,
        ylabel near ticks,
        xmin = 96,
        xmax = 108
        %\addplot[mark=none] table[x=BE,y=cnts] {si2p.txt};
        % This data looks similar:
        \addplot[mark=none, smooth] table[x=BE,y=cnts] {
            BE      cnts
            95      1
            98      1
            99      10
            99.5    5
            100 6
            101 2
            108 2


enter image description here

But if you take a closer look on the ticks on the outside, you'll see that they are somehow clipped or a least thinner. They are also black so the style seems to work for them.

enter image description here

Is this a bug or can I change the clipping region? And as a second question: is thin the correct value for the thickness?

  • Thank you for providing a MWE. But you should also ensure that it will be compilable by others. In this case, others do not have access to your table of data so can't compile it as is. Also, since this problem is really not related to the actual data, you could just use a few fixed points for the graph in the MWE. Commented Jan 13, 2013 at 1:10
  • 1
    The tick lines are, in fact, clipped. One can check with xshift=-.5\pgflinewidth. Then the last tick line is clearly seen in full-width. Commented Jan 13, 2013 at 12:10
  • @PeterGrill, ok I added a table, so everyone can compile it.
    – quinmars
    Commented Jan 13, 2013 at 12:40
  • @Qrrbrbirlbel, indeed, good catch.
    – quinmars
    Commented Jan 13, 2013 at 12:47

1 Answer 1


This is probably a bug in pgfplots. In fact, it was meant to be a feature that a huge line width of a tick label does not extend to the left or right of an axis. It should respect the line width of the axis lines, though.

If this is urgent, I can send you a patch for your version which deactivates the feature (by mail, you can find my address in the pgfplots manual).

UPDATE: this will be fixed as of pgfplots 1.11 (not released at the time of this writing). As soon as it is released, you will need to write \pgfplotsset{compat=1.11} to activate it (I do not want to modify bounding boxes in existing figures - that way, it applies only to new documents).

  • No it's not urgent. I just started to layout my PhD thesis, but I'm far from writing it. Thanks
    – quinmars
    Commented Jan 13, 2013 at 22:07
  • Any solution for this yet?
    – Jellby
    Commented May 21, 2013 at 13:56
  • I am hitting the same behavior; is there some workaround?
    – Koji
    Commented Oct 3, 2013 at 8:26
  • 2
    @quinmars: Dirty, dirty workaround: \def\pgfplots@drawticklines@INSTALLCLIP@onorientedsurf#1{}% \def\pgfplots@drawgridlines@INSTALLCLIP@onorientedsurf#1{}%
    – Koji
    Commented Oct 3, 2013 at 9:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .