如何缩放 pgfplot 的一部分

如何缩放 pgfplot 的一部分

您能看到名为 的交点T_{0,2}吗?从此图中,我想仅绘制交点周围的放大部分T_{0,2}。我该如何实现这一点?

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{intersections}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\pgfmathdeclarefunction{gauss}{2}{%
  \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}

\begin{document}

\begin{figure}
    \centering
    \scalebox{1.5}{
    \begin{tikzpicture}
        \begin{axis}[
            yticklabels=\empty, xticklabels=\empty,
            width=8cm,
            height=6cm,
            domain=-2:3, ymin = 0.07, xmin = -2, enlargelimits=upper,
            xtick=\empty, ytick=\empty,
            clip mode=individual,
            xlabel={$T_0$}, ylabel={$\Delta T$},
            ]
            \addplot[smooth,red,samples=50,domain=-2:3,name path=gaussian]{8 * gauss(1,0.75)};
            \addplot[smooth,blue,name path=line]{x*1.13 + 1.36};
            \fill 
                [name intersections={of=gaussian and line, name=i, total=\t}] 
                [red, opacity=1, every node/.style={above left, black, opacity=1}] 
                \foreach \s in {2,...,\t}{
                    (i-\s) circle (2pt)
                    node [above left] {}
                };
            \node[circle,draw=black!80,fill=yellow,scale=0.3,label=below:\scriptsize{$T_{C}$}] at (i-1|-0,0.07) {};
            \draw[dotted] (i-2)--(i-2|-0,0);
            \node[circle,draw=black!80,fill=yellow,scale=0.3,label=below:\scriptsize{$T_{0,1}$}] at (i-2|-0,0.07) {};
            \draw[dotted] (i-3)--(i-3|-0,0);
            \node[circle,draw=black!80,fill=yellow,scale=0.3,label=below:\scriptsize{$T_{0,2}$}] at (i-3|-0,0.07) {};

        \end{axis}
    \end{tikzpicture}
    }
\end{figure}

\end{document}

相关内容