![使用带有 gnuplot 和 tikz 装饰的 pgfplots 时尺寸太大](https://linux22.com/image/466132/%E4%BD%BF%E7%94%A8%E5%B8%A6%E6%9C%89%20gnuplot%20%E5%92%8C%20tikz%20%E8%A3%85%E9%A5%B0%E7%9A%84%20pgfplots%20%E6%97%B6%E5%B0%BA%E5%AF%B8%E5%A4%AA%E5%A4%A7.png)
我使用以下代码(使用 MikTeX 最新版本和 GNUplot 5.4.8)来绘制参数图:
\documentclass{article}
\usepackage[dvipsnames, svgnames, table]{xcolor}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{% tikz
arrows.meta,
decorations,
decorations.pathreplacing,
decorations.markings
}
\usepgfplotslibrary{
fillbetween
}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[% settings
name=plot1,
axis background/.style={
fill=LightBlue!20, opacity=0.75
},
% no marks,
% axis on top=true,
axis x line=middle,
axis y line=middle,
axis equal image,
x axis line style={
Gray,
line cap = round,
-Latex[round]
},
% xticklabel=\empty,
% x tick style = {
% {draw=none}
% },
y axis line style={
Gray,
line cap = round,
-Latex[round]
},
% yticklabel=\empty,
% y tick style = {
% {draw=none}
% },
restrict x to domain=-10:10,
restrict y to domain=-10:10,
xmin= -5, xmax=+5,
ymin= -5, ymax=+5,
smooth,
grid=both,
major grid style={line width=.2pt,draw=gray!50},
minor grid style={line width=.1pt,draw=gray!50},
minor tick num=4
]
\foreach \a/\b in {4/7,9/13}{
\addplot[
postaction={
decoration={markings,
mark=at position 0.68 with {\arrow{Latex[round,scale=2]}}
},
decorate
},
line cap=round,
] gnuplot [raw gnuplot] {
set parametric;
plot
-1*(\a)*exp(4*t)+(\b)*exp(4*t),
-1*(\a)*exp(4*t)+(\b)*exp(4*t)*t+
.5*(\b)*exp(4*t);
};
\addplot[
postaction={
decoration={markings,
mark=at position 0.7 with {\arrow{Latex[round,scale=2]}}
},
decorate
},
line cap=round,
] gnuplot [raw gnuplot] {
set parametric;
plot
-1*(-\a)*exp(4*t)+(-\b)*exp(4*t),
-1*(-\a)*exp(4*t)+(-\b)*exp(4*t)*t+
.5*(-\b)*exp(4*t);
};
}
\addplot[
postaction={decorate},
decoration={markings,
mark=at position 0.9 with {\arrow{Latex[round,scale=2]}}
},
densely dashed, line cap=round
] {x};
\addplot[
postaction={decorate},
decoration={markings,
mark=at position 0.1 with {\arrowreversed{Latex[round,scale=2]}}
},
densely dashed, line cap=round
] {x};
\end{axis}
\end{tikzpicture}
\end{document}
然而 TeX 抱怨:“尺寸太大”。我试过了
移除密钥
smooth
调整标记位置
使用 wsl 上的 TeXLive 2023 进行编译
但仍然没有进展。
我现在考虑使用渐近线来做参数图,但是在使用渐近线时如何指定 x 和 y 的定义域?