polaraxis: inaccurate plots with coord trafo and 'data cs=rad'
Brought to you by:
cfeuersaenger,
ludewich
Hi,
combining polaraxis with coordinate transformations and data in radian coordinate system leads to inaccurate axis markers and slightly rotated grid lines. A minimum example to reproduce and illustrate the issue is given here:
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\usetikzlibrary{calc}
\begin{document}
% using rad-system -> broken
\begin{tikzpicture}
\begin{polaraxis}[
xtick={0,90,180,270}, % works ok without
x coord trafo/.code=\pgfmathparse{#1-pi/2}, % rotate by 90°
x coord inv trafo/.code=\pgfmathparse{#1+90}, % rotate back
]
\addplot[data cs=polarrad, ] coordinates {(pi/2,0.5) (0,0.5)};
\end{polaraxis}
\end{tikzpicture}
% using deg-system -> ok
\begin{tikzpicture}
\begin{polaraxis}[
xtick={0,90,180,270},
x coord trafo/.code=\pgfmathparse{#1-90}, % rotate by 90°
x coord inv trafo/.code=\pgfmathparse{#1+90}, % rotate back
]
\addplot[] coordinates {(90,0.5) (0,0.5)};
\end{polaraxis}
\end{tikzpicture}
\end{document}
The code and the resulting PDF output are appended.
I would appreciate a fix for the issue, if possible. Please let me know if you need any further information.