TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a few PGF plots in my document where the label positions need to be adjusted separately from other plots. I use the \pgfplotsset in preamble to adjust some general settings applicable to all the plots. An MWE is as follows:


    \pgfplotsset{plot coordinates/math parser=false}
    label style={anchor=near ticklabel},
    xlabel style={yshift=0.5em},
    ylabel style={yshift=-0.5em},
    tick label style={font=\scriptsize },
    label style={font=\scriptsize},
    legend style={font=\scriptsize},
    title style={font=\fontsize{7}}}


        axis lines*=left,
        ylabel absolute, ylabel style={yshift=-1em}]
        \addplot+[mark=none] plot {x^2};

        axis lines*=left]
        \addplot+[mark=none] plot {x^2};


The problem I have is that when I want to adjust the label position in a plot axis property the labels font sizes get reset to the original value and are not \scriptsize

How can I set the individual label distance while preserving the global label style like fonts, etc. ? I know I can separately adjust the font size in the axis property but I would like to use a global setting for the fonts!


share|improve this question
up vote 7 down vote accepted

As given in the manual

/pgfplots/ylabel absolute/.style={%
    /pgfplots/every axis y label/.style={at={(0,0.5)},xshift=-35pt,rotate=90},
    /pgfplots/every y tick scale label/.style={
    at={(0,1)},above right,inner sep=0pt,yshift=0.3em

is not an /.append style but overwrites the previous settings. Either you rename this style and change /.style keys to /.append style or add those settings manually.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.