Relative coordinates do not work as expected with compat>=1.11
Brought to you by:
cfeuersaenger,
ludewich
Commands like
\draw (axis cs:0,0) -- ++(0,1cm);
do no longer work as expected if compat
is set to 1.11 or later. I would expect a vertical line to be drawn. But I get a sloped line to the upper right.
Setting compat
to 1.10 gives a vertical line.
\documentclass[border=5pt]{standalone} \usepackage{pgfplots} \begin{document} \pgfplotsset{compat=1.10} \begin{tikzpicture} \begin{axis}[ xmin=-1,xmax=1, ymin=-1,ymax=1 ] \draw (axis cs:0,0) -- ++(0,1cm); \end{axis} \end{tikzpicture} \pgfplotsset{compat=1.11} \begin{tikzpicture} \begin{axis}[ xmin=-1,xmax=1, ymin=-1,ymax=1 ] \draw (axis cs:0,0) -- ++(0,1cm); \end{axis} \end{tikzpicture} \end{document}
Thanks for the bug report; I will take care of it.
For the time being, you can avoid the issue either by using compat=1.9 as in your example or by using "++(0cm,1cm)", i.e. dimensional units in both arguments.
The background is that pgfplots tries to interprete any coordinate within its axis cs automatically as of 1.11 -- and that failed here.
I will fix it.