首次尝试创建此情节
最小工作示例:
\RequirePackage{filecontents}
\begin{filecontents}{CO2.dat}
O2, CO
0, 72
40, 48
46, 39
52, 28
51.5, 22
49.5, 18
40.5, 16
33, 15
26, 15
19, 14.5
8, 14
0, 12.7
\end{filecontents}
\begin{filecontents}{N2.dat}
O2, CO
0, 72
50, 45
62, 29
65, 25
68, 17
67, 14
66, 13
46, 13
28, 12.8
0, 12.7
\end{filecontents}
\documentclass[crop,tikz]{standalone}
\usepackage{pgfplots,pgfplotstable}
\begin{document}
\pgfplotstableread[col sep = comma]{N2.dat}\Nitrogen
\pgfplotstableread[col sep = comma]{CO2.dat}\Carbondioxide
\begin{tikzpicture}
\pgfplotsset{compat=newest}
\pgfplotsset{width=10cm, height=10cm},
\begin{axis}[grid=major,
xmin=0,xmax=100,
ymin=0, ymax=80,
ylabel={Carbon Monoxide (mol\%)},
xlabel={Oxygen (mol\%)},
]
\addplot+[] table [x=O2, y=CO, col sep=comma] {\Nitrogen}; \addlegendentry{Nitrogen};
\addplot+[] table [x=O2, y=CO, col sep=comma] {\Carbondioxide}; \addlegendentry{Carbone dioxide};
\end{axis}
\end{tikzpicture}
\end{document}
产生这个:
如何才能画出如原图所示的曲线?