I would like to reduce the label font size in a pgfplot.
When I do x tick label style={rotate=90, anchor=east}, the file compiles, when I do x tick label style={font=\small,rotate=90, anchor=east}, to reduce the font size, I get
! Undefined control sequence.
\tikz@textfont ->\small
l.14 \end{axis}
\end{tikzpicture}
?
Where is the problem? I've seen this expression working in hundreds of examples on the web.
Full code:
\documentclass{minimal}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[scaled]{helvet}
\usepackage[T1]{fontenc}
\usepackage{verbatim}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usetikzlibrary{plotmarks}
%%%<
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\PreviewEnvironment{verbatim}
\setlength\PreviewBorder{5pt}
%%%>
\begin{document}
\begin{tikzpicture}\begin{axis}[
title = { Title },
ymin=0, xbar, bar width=10cm / 67.5 , width=10cm, xtick={1,..., 27 },
xticklabels={%
Sample 1 ,
Sample 2,
Sample 3,
}, x tick label style={font=\small,rotate=90, anchor=east}, ylabel={Concentration [pg / $10^5$ cells]},]
\addplot[fill=black,draw=black,ybar,error bars/.cd,y dir=both,y explicit] coordinates {
( 1 , 0.0 ) +- ( 0.0 , 0.0 )
( 2 , 3.38661354582 ) +- ( 4.78939480701 , 4.78939480701 )
( 3 , 1.05696969697 ) +- ( 1.49478088047 , 1.49478088047 )
};
\end{axis}\end{tikzpicture}
\end{document}
minimalclass. It does not define\small. Consider usingarticleorstandalone. Why not use the minimal class – Qrrbrbirlbel Mar 01 '13 at 14:46minimalclass doesn't define\smalland the other size changing commands. It should not be used except for testing packages. See Why not use the minimal class – egreg Mar 01 '13 at 14:46