I would like to annotate a patch plot with lines whose start and end points are given in absolute polar and relative polar coordinates, respectively.
The patch plot, based on cartesian data, comes out as a circular shape centred around the origin (0,0) and shall be simulated here by a plain circle.
Lines should start at the circumference of the shape and point away from the shape under a given angle and have a well defined length. Therefore, the use of relative polar coordinates for the line's end point.
What seems to be straightforward with TikZ (left) fails inside the axis
environment of pgfplots (right): neither the inclination angle nor the length of the line are correct if relative polar coordinates are used.
What is wrong with the rel. polar coordinates here?
The code:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}
\begin{document}
\begin{tikzpicture}
\draw(0,0) circle[radius=0.01];
\draw[blue] (0,0) circle[radius=1];
\draw[thick] (45:1) -- ++(45:0.5);
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[tiny,enlargelimits,
axis equal,
xmin=-2,xmax=2,
ymin=-1,ymax=1,
xtick={-2,-1,0,1,2},
ytick={-2,-1,0,1,2},
grid=major,
]
\draw[blue] (0,0) circle[radius=1];
\draw[blue, dashdotted] (0,0) -- (45:2);
\draw[thick] (45:1) -- ++(45:0.5);
% \draw[thick] (45:1) -- (45:1.5); %absolute coordinates do work
\end{axis}
\end{tikzpicture}
\end{document}