Wie zeichne ich dieses Bild mit Tikz?

Wie zeichne ich dieses Bild mit Tikz?

Bildbeschreibung hier eingeben

Können Sie über die Lösung dieses speziellen Diagramms hinaus erklären,Wenn da isteine allgemeine Reihe von Schritten, die Sie befolgen würden, um diesen Code zu erhalten?

Meine Vermutungen:Würde die Konvertierung in Vektorgrafiken einige Richtlinien liefern?

Gibt es Teile des Prozesses, die automatisiert werden können? Usw.

Ich habe es versucht:Mithilfe von Inkscape konnte ich die Daten in Vektorgrafiken umwandeln und irgendwie eine Reihe von Koordinaten erhalten, die ich als Richtlinie für den Tikz-Code verwenden konnte.

Ich habe bisher Folgendes bekommen (ich habe etwas Code vondiese Antwort):

\documentclass{article}
\usepackage{pgfplots}
\usetikzlibrary{decorations.text}

\pgfmathdeclarefunction{gauss}{3}{%
\pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}%
}

\begin{document}‎‎

\begin{tikzpicture}
\draw[draw=none](0,4)--node[anchor=center, above] (A) {Marginal
distribution of Brownian motion through time} (10,4) ;
\draw[->,very thick](0,0)--(0,4) node[anchor=south, above left,
rotate=90] {Spacial distribution};
\draw[->,very thick](0,0)-- node[anchor=north, below] {Time} (10,0);
\draw[dotted, domain=0:9,samples=35,thick] plot ({\x+0.5},
{sqrt(\x)/2+2});
\draw[dotted, domain=0:9,samples=35, thick, smooth, postaction=
{decorate, decoration={raise=-10pt, text along path,text 
align=center,text={Spread of Willow Tree}}}] plot ({\x+0.5},
{-sqrt(\x)/2+2});
\draw[very thin, domain=-0.5:2.5,samples=35] plot({gauss(\x, 1, 1)+1},
{\x+1}) node (B) {};
\draw[very thin, domain=-0.5:2.5,samples=35] plot({gauss(\x, 1, 0.5)+3},
{\x+1}) node (C) {};
\draw[very thin, domain=-0.5:2.5,samples=35] plot({gauss(\x, 1, 0.25)+5},
{\x+1}) node (D) {};
\draw[very thin, domain=-0.5:2.5,samples=35] plot({gauss(\x, 1, 0.2)+7},
{\x+1}) node (E) {};
\draw[->] (A) to (B);
\draw[->] (A) to (C);
\draw[->] (A) to (D);
\draw[->] (A) to (E);
\end{tikzpicture}

\end{document}

was ergibt:

Bildbeschreibung hier eingeben

Antwort1

Sollte Sie in die richtige Richtung weisen ...

\documentclass[tikz, border=5]{standalone}
\begin{document}
\begin{tikzpicture}[>=stealth, line cap=round]
\draw [thick, ->] (0,-2) -- (0, 2)
  node [midway, sloped, above] {Spatial distribution};
\draw [thick, ->] (0,-2) -- (10,-2)
  node [midway, below] {Time};
\draw [thick, dotted] 
  plot [domain=-1.5:1.5, samples=50] ({(\x*2)^2+.5},\x)
  node [right, align=center] {Spread of \\ willow tree};
\foreach \t [count=\i] in {.1,0.5,1,1.5}
  \draw plot [domain=-3:3, samples=20, smooth]
    ({\i*2 + sqrt(0.5*\t*pi)*exp(-0.5*\t*pow(\x,2))}, \x/2)
    coordinate (distribution-\i);
\node [above] (label) at (5,2) 
  {Marginal distribution of Brownian motion through time};
\foreach \i in {1,...,4}
  \draw [->, shorten >=1ex] (label) -- (distribution-\i);
\end{tikzpicture}
\end{document}

Bildbeschreibung hier eingeben

Antwort2

Hier ist ein pgfplotsAnsatz:

pgfplots

\documentclass[tikz,border=10pt]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{decorations.text}

\pgfmathdeclarefunction{gauss}{3}{%
\pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}%
}

\begin{document}

\begin{tikzpicture}
  \begin{scope}[rotate=-90]

  \begin{axis}[
    domain=-0.5:2.5,
    xmin=-1, xmax=3,
    ymin=0, ymax=10,
    xlabel=Spacial distribution, ylabel=Time,
    xtick=\empty, ytick=\empty,
    axis x line=bottom, axis y line=right,
    x axis line style = {very thick,stealth-},
    y axis line style = {very thick},
    height=\textwidth,
    width=.5\textwidth,
    clip=false]

    \addplot[mark=none, thick, dotted,
      postaction={decorate, decoration={raise=-10pt, text along path,
        text align={right, right indent=3.5cm},text={|\scriptsize|Spread of Willow Tree}}}]
      {((x-1)*2)^2+.5};

    \node [xshift=-1cm,rotate=90] (label) at (current bounding box.west) 
      {Marginal distribution of Brownian motion through time};

    \foreach \t/\i in {1/1, 0.5/3, 0.25/5, 0.2/7} {
      \addplot[samples=35,smooth] {gauss(x, 1, \t)+\i};          
      \edef\temp{
        \noexpand\coordinate (g-\i) at (axis cs:-0.5,\i);
        \noexpand\draw [->, shorten >=2ex] (label) -- (g-\i);}
      \temp
    }
  \end{axis}
  \end{scope}

\end{tikzpicture}

\end{document}

verwandte Informationen