我想知道为什么我得到的矢量场不垂直于切线?
begin{tikzpicture}
\begin{axis}[view={0}{90},ymin = 0,ymax = 3, domain=-5:5,xticklabels=\empty, yticklabels=\empty]
\addplot3 [blue,-stealth,samples=16, domain=-5:5,
quiver={
u={2*x*y},
v={x^2},
scale arrows=0.1,
},
] {1}; % use pow(x^2 + y^2,1/2) if you choose to have a real 3D plot
\addplot[purple, thick, domain=-5:5, samples=40]{3/(x^2)};
\end{axis}
\end{tikzpicture}
非常感谢!!!
答案1
这样就体现出了【轴相等】的效果。
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[view={0}{90}, axis equal,ymin = 0,ymax = 3, domain=-5:5,xticklabels=\empty, yticklabels=\empty]
\addplot3 [blue,-stealth,samples=16, domain=-5:5,
quiver={
u={2*x*y},
v={x^2},
scale arrows=0.1,
},
] {1}; % use pow(x^2 + y^2,1/2) if you choose to have a real 3D plot
\addplot[purple, thick, domain=-5:5, samples=40]{3/(x^2)};
\end{axis}
\end{tikzpicture}
\end{document}