1

I am trying to make the following graphs horizontally, I used the following answer as a basis: enter image description here

input:

\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings,arrows}

\tikzset
  {every pin/.style={pin edge={<-}}
  ,>=stealth
  ,flow/.style=
    {decoration=
      {markings
      ,mark=at position #1 with {\arrow{>}}
      }
    ,postaction={decorate}
    }
  ,flow/.default=0.5
  }
\newcommand\inlayscale{}
\newcommand\inlaycaption[1]{{\sffamily\scriptsize#1}}
\newcommand\newinlay[4][0.18]%
  {\renewcommand\inlayscale{#1}%
   \newsavebox#2%
   \savebox#2%
     {\begin{tabular}{@{}c@{}}
        #4\\[-1ex]
        \inlaycaption{#3}\\[-1ex]
      \end{tabular}%
     }%
  }
\newcommand\inlay[1]{\usebox{#1}}
\newcommand\Tr{\mathop{\mathrm{Tr}}}

\newinlay\saddle{index $-1$}%
  {\begin{tikzpicture}[scale=\inlayscale]
     \foreach \sx in {+,-}
      {\draw[flow] (\sx4,0) -- (0,0);
       \draw[flow] (0,0) -- (0,\sx4);
       \foreach \sy in {+,-}
         \foreach \a/\b/\c/\d in {2.8/0.3/0.7/0.6,3.9/0.4/1.3/1.1}
           \draw[flow] (\sx\a,\sy\b)
              .. controls (\sx\c,\sy\d) and (\sx\d,\sy\c)
              .. (\sx\b,\sy\a);
      }
   \end{tikzpicture}%
  }


\newinlay[0.15]\centre{index $0$}%
  {\begin{tikzpicture}[scale=\inlayscale]
     \draw (-4,0) -- (4,0);
     \draw (0,-4) -- (0,4);
     \foreach \r in {1,2,3} \draw[flow=0.63] (\r,0) arc (0:-360:\r cm);
   \end{tikzpicture}%
  }


\newinlay\source{index $+1$}%
  {\begin{tikzpicture}[scale=\inlayscale]
     \foreach \sx in {+,-}
      {\draw[flow] (0,0) -- (\sx4,0);
       \draw[flow] (0,0) -- (0,\sx4);
       \foreach \sy in {+,-}
         \foreach \a/\b in {2/1,3/0.44}
           \draw[flow,domain=0:\sx\a] plot (\x, {\sy\b*\x*\x});
      }
   \end{tikzpicture}%
  }

\newinlay[0.15]\dipolo{index $+2$}%
  {\begin{tikzpicture}
  \foreach \x in {-3,-2,-1,0,1}
  \draw (0,\x/5) circle [radius=\x/5+1/5];
  \draw (-1,-1/5) -- (1,-1/5);
\end{tikzpicture}
  }


\begin{document}
\begin{tikzpicture}[line cap=round,line join=round]
  % n diagram


  % inlays
  \node at (-4,0) {\inlay\saddle};
  \node at (-2,0) {\inlay\saddle};
  \node at (0,0) {\inlay\source};
  \node at (2,0){\inlay\centre};
  \node at (4,0) {\inlay\source};
  \node at (6,0) {\inlay\dipolo};
\end{tikzpicture}
\end{document}

output: enter image description here

I know that it doesn't look anything like what I want, for example the dates are very rough, I would like them to be more visible (more fluid). I'll keep trying and any updates I'll post here. Any kind of help I will be very grateful.

5
  • 3
    Dates? Dots? Could you explain a bit more what you are not happy with and describe how you would like it to be?
    – mickep
    May 20 at 6:07
  • It's not just that, as you can see my graphs don't look like what I need. For example, I would like the dates to be a little smaller, I feel that being large you cannot really appreciate the flow and the shape that is expected within the phase plane. If you zoom in on the center graph you will see that the dates are not well centered so it cannot be seen well. I have only tried to modify something that I saw in an answer, and give it the form that I want so I am stuck.
    – Zaragosa
    May 20 at 13:36
  • I don't know what is meant by a "Date" in this context.
    – mickep
    May 20 at 13:40
  • I'm sorry, my English is bad: I mean the arrows
    – Zaragosa
    May 20 at 13:43
  • 2
    You may try mark=between positions #1 and #2 step 2em with {\arrow [scale=#3]{latex}} in your flow/.style from my previous answer to you here.
    – FHZ
    May 23 at 16:00

1 Answer 1

0
+50

I added mark=between positions #1 and 0.99 step 1.5em with {\arrow{>} [scale=0.5]} to your decoration, so the original source code works as previously,

I also created your index = -2 design at doubleSaddle, not the best name. I drew it with colors so it is easier to understand how the lines with control .. are mirrored while preserving flow direction. I used tikzedt to draw it by moving nodes and controls with mouse.

Your code for index=0 and index=1 were not the same from your original handraw. I didn't change them, I kept number as you wrote in the code.

Other index figures I just changed the flow=<parameter> in order to have a better result.

\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings,arrows}

\tikzset
{every pin/.style={pin edge={<-}},
  >=stealth,
  flow/.style={
    decoration={
      markings,
      mark=between positions #1 and 0.99 step 1.5em with {\arrow{>} [scale=0.5]}
    }, postaction={decorate}
  },
  flow/.default=0.5
}
\newcommand\inlayscale{}
\newcommand\inlaycaption[1]{{\sffamily\scriptsize#1}}
\newcommand\newinlay[4][0.18]%
{\renewcommand\inlayscale{#1}%
  \newsavebox#2%
  \savebox#2%
  {\begin{tabular}{@{}c@{}}
      #4\\[-1ex]
      \inlaycaption{#3}\\[-1ex]
    \end{tabular}%
  }%
}
\newcommand\inlay[1]{\usebox{#1}}
\newcommand\Tr{\mathop{\mathrm{Tr}}}

\newinlay\doubleSaddle{index $-2$}%
{\begin{tikzpicture}[scale=\inlayscale,red]
    \foreach \sx in {+,-}{
      \draw[flow=0.1] (4,0) -- (-4,0);
      \draw[flow,blue!50!black] (0,0) -- (2,\sx3);
      \draw[flow=0.75,blue] (-2,\sx3) -- (0,0);
      
      \draw[flow=0.20,orange] (-1.7,\sx3)
      .. controls (-0.3,\sx1.2) and (0.3,\sx1.2)
      .. (1.7,\sx3);
      \draw[flow=0.20,green] (3.9,\sx0.2)
      .. controls (1.9,\sx0.2) and (0.8,\sx0.8)
      .. (2.1,\sx2.8);
      \draw[flow=0.20,green!50!black] (-2.1,\sx2.8)
      .. controls (-0.8,\sx0.8) and (-1.9,\sx0.2)
      .. (-3.9,\sx0.2);
    }
  \end{tikzpicture}%
}

\newinlay\saddle{index $-1$}%
{\begin{tikzpicture}[scale=\inlayscale]
    \foreach \sx in {+,-}
    {\draw[flow] (\sx4,0) -- (0,0);
      \draw[flow] (0,0) -- (0,\sx4);
      \foreach \sy in {+,-}
      \foreach \a/\b/\c/\d in {2.8/0.3/0.7/0.6,3.9/0.4/1.3/1.1}
      \draw[flow] (\sx\a,\sy\b)
      .. controls (\sx\c,\sy\d) and (\sx\d,\sy\c)
      .. (\sx\b,\sy\a);
    }
  \end{tikzpicture}%
}

\newinlay[0.15]\centre{index $0$}%
{\begin{tikzpicture}[scale=\inlayscale]
    \draw (-4,0) -- (4,0);
    \draw (0,-4) -- (0,4);
    \foreach \r in {1,2,3} \draw[flow=0.1] (\r,0) arc (0:-360:\r cm);
  \end{tikzpicture}%
}

\newinlay\source{index $+1$}%
{\begin{tikzpicture}[scale=\inlayscale]
    \foreach \sx in {+,-}
    {\draw[flow] (0,0) -- (\sx4,0);
      \draw[flow] (0,0) -- (0,\sx4);
      \foreach \sy in {+,-}
      \foreach \a/\b in {2/1,3/0.44}
      \draw[flow,domain=0:\sx\a] plot (\x, {\sy\b*\x*\x});
    }
  \end{tikzpicture}%
}

\newinlay[0.15]\dipolo{index $+2$}%
{\begin{tikzpicture}
    \foreach \x in {-3,-2,-1,0,1}
    \draw[flow=0.1] (0,\x/5) circle [radius=\x/5+1/5];
    \draw (-1,-1/5) -- (1,-1/5);
  \end{tikzpicture}
}

\begin{document}
\begin{tikzpicture}[line cap=round,line join=round]
  % inlays
  \node at (-4,0) {\inlay\doubleSaddle};
  \node at (-2,0) {\inlay\saddle};
  \node at (0,0){\inlay\centre};
  \node at (2,0) {\inlay\source};
  \node at (4,0) {\inlay\dipolo};
\end{tikzpicture}
\end{document}

enter image description here

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.