When compiling the code
\documentclass{standalone}
\usepackage{pgfplots}\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
x label style={rotate=45},
xlabel=$x$,
y label style={rotate=45},
ylabel=$y$,
z label style={rotate=45,at={(0,0.5)}},
zlabel=$z$,
axis lines=center,
view={45}{20}
]
\addplot3[surf,opacity=0.5] {x^2-y^2};
\end{axis}
\end{tikzpicture}
\end{document}
the axis label style
in the axis environment options do not seem to work.
The resulting picture looks like
Here you can see that although rotate=45
is set for each of the labels, they're not in the picture. Also the at={(0,0.5)}
in z label style
does not seem to work. But if I remove the command axis lines=center
everything works fine.
How do I get these options to also work when using axis lines=center
?
axis lines=center
also setsx label style
, so it overwrites the options you set inx label style
. Moveaxis lines=center
to the start of your options list, and it will work as expected