# [Tex/LaTex] How to draw a spiral in phase portrait

technical-drawingtikz-pgf

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

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".