1

Setting the global option label style in a polaraxis does not seem to have any effect. Is there a specific style to use in this case ? I could not find any in the documentation.

% arara: pdflatex
\documentclass[tikz]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\pgfplotsset{compat=newest}
\pgfplotsset{
label style={font=\huge},
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
width=7cm,
height=7cm,
xmin=0,
xmax=20,
ymin=-2,
ymax=2,
xlabel={XXXXXXXXXX},
yticklabel style={rotate=90},
ylabel={YYYYYYYYYY},
]
%
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{polaraxis}[%
width=7cm,
height=7cm,
xmin=0,
xmax=360,
ymin=-2,
ymax=2,
xlabel={XXXXXXXXXX},
yticklabel style={rotate=90},
ylabel={YYYYYYYYYY},
]
%
\end{polaraxis}
\end{tikzpicture}

\end{document}

Example in axis

enter image description here

Example in polaraxis

enter image description here

2

From tikzlibrarypgfplots.polar.code.tex one learns that for polar axes the relevant key is polar labels style. There you can see that the x and y labels are treated differently for this kind of axis. (Footnotes 17 and 18 of the manual v1.16 suggest that these labels are tricky. ;-)

\documentclass[tikz]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
%\pgfplotsset{compat=newest}
\pgfplotsset{compat=1.16}
\pgfplotsset{label style={font=\huge},polar labels style={font=\huge}}

\begin{document}
\begin{tikzpicture}
\begin{axis}[%
width=7cm,
height=7cm,
xmin=0,
xmax=20,
ymin=-2,
ymax=2,
xlabel={XXXXXXXXXX},
yticklabel style={rotate=90},
ylabel={YYYYYYYYYY},
]
%
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{polaraxis}[%
width=7cm,
height=7cm,
xmin=0,
xmax=360,
ymin=-2,
ymax=2,
xlabel={XXXXXXXXXX},
yticklabel style={rotate=90},
ylabel={YYYYYYYYYY},
]
%
\end{polaraxis}
\end{tikzpicture}

\end{document}

enter image description here

  • Indeed, thats a tricky one ! Thanks ! It's really about finding a needle in a haystack – BambOo Sep 6 '19 at 12:22
  • @BambOo Yes, at least I could not find the key in the manual. Then I "invented" it before I realized it is already in tikzlibrarypgfplots.polar.code.tex.... ;-) – Schrödinger's cat Sep 6 '19 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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