我正在尝试制作一个运动图,也称为洋葱图,我手工绘制了它,但对结果并不完全满意。红色曲线每次都应该更大,右侧应该更大。有没有办法或多或少地自动完成这个?
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=600, xmax=2000,
ymin=0, ymax=2500,
xlabel={rev [$rpm$]},ylabel={Torque [$Nm$]},
height=9cm,
width=9cm,
grid=major
]
\addplot+[ultra thick,no markers] coordinates {
(700, 600)
(850, 900)
(1100, 2200)
(1450, 2200)
(1600, 2000)
(1800, 1850)
(1950, 550)
};
\addplot+[thick,no markers, smooth,tension=0.8] coordinates {
(950, 1400)
(1050, 1000)
(1190, 990)
(1260, 1500)
(1200, 2000)
(1100, 2200)
};
\addplot[thick,no markers, smooth,tension=0.9,red] coordinates {
(910, 1200)
(1100, 750)
(1400, 1100)
(1600, 2000)
};
\addplot[thick,no markers, smooth,tension=0.4,red] coordinates {
(860, 960)
(1000, 650)
(1200, 550)
(1500, 1000)
(1750, 1880)
};
\node[fill=white] at (1250,1300) {\footnotesize 190 $g/kWh$};
\node[fill=white] at (1400,1100) {\footnotesize 195};
\node[fill=white] at (1500,1000) {\footnotesize 200};
\end{axis}
\end{tikzpicture}
\end{document}