![Wie kann ich die Schriftgröße auf XY-Etiketten ändern?](https://rvso.com/image/330714/Wie%20kann%20ich%20die%20Schriftgr%C3%B6%C3%9Fe%20auf%20XY-Etiketten%20%C3%A4ndern%3F.png)
Ich habe den folgenden Code, den ich von hier kopiert habeWie zeichnet man die Einheitshyperbel in LaTex?, und habe es gedreht. Die Schriftart der Achsenbeschriftungen ist zu groß. Ich habe das Handbuch und die verschiedenen Beiträge durchgesehen und kann mein Problem nicht lösen. Ich habe versucht, {font size=tiny an verschiedenen Stellen einzufügen, aber es hat sich nichts geändert. Hilfe wäre willkommen.
\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]
\addplot [red,domain=-2:2] ({cosh(x)}, {sinh(x)});
\addplot [red,domain=-2:2] ({-cosh(x)}, {sinh(x)});
\addplot[red,dashed] expression {x};
\addplot[red,dashed] expression {-x};
\end{axis}
\end{tikzpicture}
\end{document}
Antwort1
Sie können die Schriftgröße von labels
und tick labels
mit label style={font=\tiny}
und ändern.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]
\addplot [red,thick,domain=-2:2] ({cosh(x)}, {sinh(x)});
\addplot [red,thick,domain=-2:2] ({-cosh(x)}, {sinh(x)});
\addplot[red,dashed] expression {x};
\addplot[red,dashed] expression {-x};
\end{axis}
\end{tikzpicture}
\end{document}