Latex TikZ 帮助绘制折叠和霍普夫分岔

Latex TikZ 帮助绘制折叠和霍普夫分岔

我想为 LaTeX 报告重新创建这些通用分岔图,以说明折叠、亚临界和超临界 Hopf 分岔。我无法通过查看其他 TikZ 代码来弄清楚如何做到这一点。褶皱分叉 亚临界霍普夫超临界霍普夫

答案1

您可以从以下几点开始:

我不是数学家所以我必须猜测这是什么类型的函数。

\documentclass[border=2cm]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\begin{document}
    
\begin{tikzpicture}
    \begin{axis}[
        samples=1000,
        xlabel=$x$,
        xtick=\empty,
        ytick=\empty,
        ylabel=$r$,
        xmin=-2,xmax=6,
        ymin=-2,ymax=6,
        axis lines=middle,
        x label style={at={(current axis.right of origin)},anchor=north, below=-5mm},
        minor x tick num=3,
        minor y tick num=3,
        ticklabel style={font=\small},
        enlargelimits={abs=0.5},
        ]

        \draw[blue,dashed] \pgfextra{
            \pgfpathellipse{\pgfplotspointaxisxy{3}{0}}
            {\pgfplotspointaxisdirectionxy{0.5}{0}}
            {\pgfplotspointaxisdirectionxy{0}{1.7}}
        };
    \addplot[,smooth,domain = 0:5,name path = A,red]{x^(1/2)};
    \addplot[red,smooth,dashed,domain = 0:5,name path = A,red]{-x^(1/2)};

    \end{axis}
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

使用包的另一个可能的起点pgfplots

\documentclass[border=3.141592, varwidth]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}

\begin{document}
    \begin{tikzpicture}
\begin{axis}[
    axis lines=middle,
    axis line style={-,very thin},
    samples=200,
    xtick=\empty,   xlabel=$c$,
    ytick=\empty,   ylabel=$x$,
    label style={below left},
    every axis plot post/.append style={very thick, brown},
    domain = -4:0,
    enlarge x limits={0.2,upper},
    no marks
    ]
\addplot    {sqrt(abs(x))};
\addplot [dash pattern=on 5pt off 2pt]  {-sqrt(abs(x))};
\end{axis}
    \end{tikzpicture}

\bigskip
    \begin{tikzpicture}
\begin{axis}[
    axis lines=middle,
    axis line style={-,very thin},
    samples=200,
    xtick=\empty,   xlabel=$\gamma$,
    ytick=\empty,   ylabel=$r$,
    label style={below left},
    every axis plot post/.append style={very thick, brown, dash pattern=on 5pt off 2pt},
    domain = 0:4,
    enlarge x limits={0.2,lower},
    no marks
    ]
\addplot    { sqrt(x)};
\addplot    {-sqrt(x)};

\scoped[every path/.style = {very thick, brown, dash pattern=on 5pt off 2.5pt}]
{
\draw           (-2,0) -- (0,0);
\draw [solid]   (0,0) -- (4,0);
%
\draw[blue]     (2,0) ellipse [x radius=0.5, y radius=sqrt(2)];
}
\end{axis}
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容