5

As a followup question to my answer here, I have a problem with the polaraxis of pgfplots. When I try to define xtick, nothing changes compared to dropping the option.

MWE

\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}  
\pgfplotsset{compat=1.13}

\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[xtick={0,45,...,360},]   
\end{polaraxis}
\end{tikzpicture}
\end{document}

Result (with x ticks in steps of 30° instead of 45°!) a simple polar axis

crateane
  • 2,217

1 Answers1

5

With your code I got the warning

Package pgfplots Warning: You have an axis with empty range (in direction ). Re placing it with a default range and clearing all plots.

So if there is no plot inside the polaraxis environment set at least a value for ymax.

\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}  
\pgfplotsset{compat=1.13}

\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[
  xtick={0,45,...,360},
  ytick={0,.5,1},
  ymax=1.1
  ]
\end{polaraxis}
\end{tikzpicture}
\end{document}

Result:

enter image description here

Alternative:

\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}  
\pgfplotsset{compat=1.13}

\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[
  xtick={0,45,...,360},
  ]
\addplot[draw=none]coordinates{(0,1)};
\end{polaraxis}
\end{tikzpicture}
\end{document}
esdd
  • 85,675