I'm trying to draw an ellipse inside a semi-logarithmic pgfplots
axis. The ellipse axes should be parallel to the coordinate axes, but depending on the radii I choose, the ellipse appears rotated.
Here's a MWE:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\pgfplotsset{width=7cm}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ymode=log]
\addplot coordinates{
(0,10) (1,300) (2,3347) (3,5000)
};
\draw
(axis cs:1,300) ellipse [
x radius = 1, y radius = 10];
\end{axis}
\end{tikzpicture}
\end{document}
which produces
How can I align the ellipse with the coordinate axes, so that they are parallel to the ellipse axes?
document has been generated with the most recent feature set (\pgfplotsset{compat=1.9}
. So version 1.9, I guess.rotate=-45
will get the horizontal ellipse, but that only works for your particular radii. found by trial and error. I know it's not a good solution, but if you need it now it will get you by.