1

I have multiple quiver plots in one figure and want to distinguish between them by the arrow head type/ style.

Can anyone help me, how the head can be changed?

Thanks, Peter

My MWE:

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
% -----------------------------------------------------------------------------
\begin{document}
\begin{tikzpicture}
 \begin{axis}[ ]
  \addplot[quiver={u=0,v=x},-stealth] {1}; 
 \end{axis}
\end{tikzpicture}
\end{document}
  • Hi Peter, welcome to the site! You can format your code sample by selecting the code and clicking the {} button in the editor (or pressing Ctrl+K). – Jake Jun 18 '15 at 8:09
  • If I compile your code, I get a quiver plot with stealth arrow heads. If I change -stealth to some other arrow head type, like -latex or ->, the arrow head in the picture also changes. Does that not work for you? – Jake Jun 18 '15 at 8:12
  • Thanks for your great help! Or rather sorry for the too easy question... Sometimes pgfplots is easier than I assume... – Peter Jun 18 '15 at 8:16
3

You can change the arrow head type by putting -stealth, -latex, -> (or any of the other arrow head keys) in the \addplot [...] options:

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
% -----------------------------------------------------------------------------
\begin{document}
\begin{tikzpicture}
 \begin{axis}[ ]
  \addplot[quiver={u=0,v=x},-stealth] {1}; 
  \addplot[quiver={u=0.1*x,v=-x},->, red] {1}; 
 \end{axis}
\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.