# How to draw a spiral in phase portrait?

I am aware of easily drawing a spiral in the note of nonlinear dynamics. Here are some examples:

• -1: No research effort. – Werner Mar 13 '14 at 6:10
• Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. – Holene Mar 13 '14 at 6:21
• the above is just a statement…not a question! – Leeser Mar 13 '14 at 14:09

You can use TikZ. Here is an example:

But I never used it before, so maybe there is a better method than gluing arrows together, here is the code:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}

%for arrows in the middle of the line
\usetikzlibrary{decorations.markings}
\tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {\arrow{>}}},postaction={decorate}}}

\begin{document}
\begin{tikzpicture}
%straight lines
\draw[->-=.4] (0,0) to (-1,0);
\draw[->-=.6] (0,-1) to (0,0);
%arcs on the left
\draw[->-=.5] (-0.3,1) to [out=-90,in=0] (-1,0.3);
\draw[->-=.5] (-0.3,-1) to [out=90,in=0] (-1,-0.3);
%big circle from the bottom to the top
\draw[->-=.5] (0.3,-1) to [out=90,in=200] (0.8,-0.3);
\draw (0.8,-0.3) to [out=20, in =-90] (1.5,0.5) to [out=90, in=0] (0.7,1.3) to [out=180,in=90] (0,0.5);
\draw[->-=.2]  (0,0.5) to (0,0);
%inward spiral
\draw[->-=.8]  (0,0) to (0.5,0);
\draw[->] (0.5,0) to [out=0, in=-90] (1.1,0.5) to [out=90, in=0] (0.7,0.9) to [out=180, in=90] (0.4,0.6) to [out=-90, in=180] (0.6,0.4) to [out=0,in=-90] (0.75,0.6);
\end{tikzpicture}
\end{document}


Check you the very minimal introduction to TikZ. In order to get the arrows in the middle of a line, I googled "tikz arrows in the middle of line".

• Without code it's worth just about nothing. – Svend Tveskæg Mar 13 '14 at 10:34
• I thought, this more a general question, since the original post had no code in it either. Added the code now. – jens_bo Mar 13 '14 at 10:59
• Wow! Thanks you! It looks really great! I guess I need to spend some time on learning the tikz... – LorenMt Mar 13 '14 at 16:15