Trouble with 3D axis in pgfplots
I have texlive 2012 and have drawn a curve in three dimensions with
pgfplots. That has not been a problem. The axes occurs in a way not appear
well suited. In the code I indicated that ymax = 1.5, however the figure
shows that the maximum value of y is 8. Something similar happens with
ymin. Also I have a problem with caption space. Can anyone tell me any
suggestions?
\documentclass{memoir}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[scale=1.5,axis equal,view={95}{50},
axis lines=center,
axis on top,
xmin=-3.5,xmax=3.5,
ymin=-0.5,ymax=1.5,
zmin=-3,zmax=3,
xlabel={$x$},ylabel={$y$},zlabel={$z$},
every axis x label/.style={
at={(axis cs:\pgfkeysvalueof{/pgfplots/xmax},0,0)},
xshift=-0.6em,yshift=-0.1em
},
every axis y label/.style={
at={(axis cs:0,\pgfkeysvalueof{/pgfplots/ymax},0)},
xshift=0.6em,yshift=-2ex
},
every axis z label/.style={
at={(axis cs:0,0,\pgfkeysvalueof{/pgfplots/zmax})},
xshift=-0.2em,yshift=1em
}
]
\addplot3[blue,domain=-3:3,samples y=0] ({x},{x^2/(1+x^2)},{x^3/(1+x^2)});
\legend{$\Ran f$}
\end{axis}
\end{tikzpicture}
\end{document}
No comments:
Post a Comment