![使用 PGFplot 重新创建图形(无数据的绘图)](https://linux22.com/image/378961/%E4%BD%BF%E7%94%A8%20PGFplot%20%E9%87%8D%E6%96%B0%E5%88%9B%E5%BB%BA%E5%9B%BE%E5%BD%A2%EF%BC%88%E6%97%A0%E6%95%B0%E6%8D%AE%E7%9A%84%E7%BB%98%E5%9B%BE%EF%BC%89.png)
有没有办法在没有数据的情况下将源中的绘图重新创建为我自己的 LaTeX 格式?我想重新创建这两个图像(只显示线条,不显示箭头或文本):
我的图形代码:
\begin{figure}[b]
\centering
\begin{tikzpicture}
\begin{axis}[name = ax1, width = 0.7\textwidth, height = 0.4\textwidth, every axis plot/.append style={ultra thick},
axis lines = left, no markers, legend cell align={left}, grid,
xmin = 0, xmax = 30, ymin = 0, ymax = 7,
xlabel = Voltage (V), ylabel = Current (A),]
\addplot [color=red!70!black] table [x=V2, y=A2, mark = none, col sep = semicolon] {tempeffect.csv};\addlegendentry{Warm}
\addplot [color=blue!70!black] table [x=V1, y=A1, mark = none, col sep = semicolon] {tempeffect.csv};\addlegendentry{Cold}
\end{axis}
\end{tikzpicture}
\caption{Illustration of the effect of temperature on the IV curve of a cSi module}
\label{fig:ivcurvetemp}
\end{figure}
答案1
这是基于 Torbjørn T. 建议的多种应用方案。(@Torbjørn T. 如果您想发表答案,我很乐意删除它。)
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}[name = ax1, width = 0.7\textwidth, height = 0.4\textwidth, every axis plot/.append style={ultra thick},
axis lines = left, no markers, legend cell align={left}, grid,
xmin = 0, xmax = 60, ymin = 0, ymax = 7,
xlabel = Module Output Voltage, ylabel = Current Output]
\addplot[domain=0:60,samples=60,smooth,blue] {6 - exp((x-45)/3)};
\addplot[domain=0:60,samples=60,smooth,blue!60] {5.5 - exp((x-45)/3)};
\addplot[domain=0:60,samples=60,smooth,blue!20] {5 - exp((x-45)/3)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[name = ax1, width = 0.7\textwidth, height = 0.4\textwidth, every axis plot/.append style={ultra thick},
axis lines = left, no markers, legend cell align={left}, grid,
xmin = 0, xmax = 600, ymin = 0, ymax = 20,restrict y to domain=-2:20,
xlabel = Module Output Voltage, ylabel = Current Output]
\addplot[domain=0:590,samples=60,smooth,gray!50] {18 -
min(exp((x-420)/30),18)};
\addplot[domain=0:590,samples=120,smooth,blue!50] {
6 - min(exp((x-120)/20),6) +
6 - min(exp((x-300)/20),6) +
6 - min(exp((x-470)/20),6)
};
\node[align=center,blue!50,font=\small] at (axis cs:240,8) {SHADED\\ OUTPUT};
\node[align=center,gray!50,font=\small] at (axis cs:540,16) {NORMAL\\ OUTPUT};
\end{axis}
\end{tikzpicture}
\end{document}