# How can I change font size on x-y labels

I have the following code which I copied from here How to draw the unit hyperbola in LaTex?, and rotated it. The axis labels font is too large. Going through the manual and deveral posts, am not able to settle my problem. I tried to put {font size=tiny at various location, nothing changes. Help will be appreciated

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=5cm,compat=1.12}
% axis style, ticks, etc
\pgfplotsset{every axis/.append style={font=\tiny}{
axis x line=middle,    % put the x axis in the middle
axis y line=middle,    % put the y axis in the middle
axis line style={->}, % arrows on the axis
xlabel={\footnotesize$x^{'}$},          % default put x on x-axis
ylabel={\footnotesize$y^{'}$},{font=\tiny}          %
default put y on y-axis
rotate=40.0}}
% arrows as stealth fighters
\tikzset{>=stealth}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=-5,xmax=5,
ymin=-5,ymax=5]
\end{axis}
\end{tikzpicture}

\end{document}

• the easiest way is to simply add on of the predefined styles normalsize, small, footnotesize or tiny to the axis environment. Mar 24, 2016 at 14:22

You can modify font size of labels and tick labels with label style={font=\tiny} and tick label style={font=\tiny}

\documentclass[tikz]{standalone}
\usepackage{pgfplots}

% axis style, ticks, etc
\pgfplotsset{every axis/.append style={
axis x line=middle,    % put the x axis in the middle
axis y line=middle,    % put the y axis in the middle
axis line style={<->}, % arrows on the axis
xlabel={$x$},          % default put x on x-axis
ylabel={$y$},          % default put y on y-axis
label style={font=\tiny},
tick label style={font=\tiny}
}}

% arrows as stealth fighters
\tikzset{>=stealth}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
xmin=-5,xmax=5,
ymin=-5,ymax=5]

• You mean labels and tick labels? answer updated. Mar 24, 2016 at 15:09