我想重新创建上图的设置。我尝试了多种方法,最终得到了一个“不错”的图形。我正在努力连接子图形(图中用红色圈出的部分)并使其正确对齐。你们有人知道怎么做吗?我的作品是:
使用代码
[![\begin{figure*}\[h\]
\textbf{Title1}\par\medskip
\begin{tikzpicture}
\begin{axis}\[width=7cm,height=4cm,
xlabel={Temperature \[\textcelsius\]},
ylabel={Solubility },
xmin=0, xmax=100,
ymin=20, ymax=40,
xtick={0,20,40,60,80,100},
ytick={20,40},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
\]
\addplot\[
color=blue,
mark=square,
\]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO\(_4\cdot\)5H\(_2\)O}
\end{axis}
\end{tikzpicture}
\begin{minipage}\[b\]{0.2\textwidth}
\centering
Uses a NLP to minimise Cost using a battery degradation model\\
$\rightarrow$
\end{minipage}%
\begin{tikzpicture}
\begin{axis}\[width=7cm,height=4cm,
xlabel={Temperature \[\textcelsius\]},
ylabel={Solubility },
xmin=0, xmax=100,
ymin=20, ymax=40,
xtick={0,20,40,60,80,100},
ytick={20,40},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
\]
\addplot\[
color=blue,
mark=square,
\]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO\(_4\cdot\)5H\(_2\)O}
\end{axis}
\end{tikzpicture}
\textbf{Title1}\par\medskip
\begin{tikzpicture}
\begin{axis}\[width=7cm,height=4cm,
xlabel={Temperature \[\textcelsius\]},
ylabel={Solubility },
xmin=0, xmax=100,
ymin=20, ymax=40,
xtick={0,20,40,60,80,100},
ytick={20,40},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
\]
\addplot\[
color=blue,
mark=square,
\]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO\(_4\cdot\)5H\(_2\)O}
\end{axis}
\end{tikzpicture}
\begin{minipage}\[b\]{0.2\textwidth}
\centering
Limits export/import capabilities in time frames if voltage violations may occur and sets possible reactive power compensation.\\
$\rightarrow$
\end{minipage}%
\begin{tikzpicture}
\begin{axis}\[width=7cm,height=4cm,
xlabel={Temperature \[\textcelsius\]},
ylabel={Solubility },
xmin=0, xmax=100,
ymin=20, ymax=40,
xtick={0,20,40,60,80,100},
ytick={20,40},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
\]
\addplot\[
color=blue,
mark=square,
\]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO\(_4\cdot\)5H\(_2\)O}
\end{axis}
\end{tikzpicture}
\textbf{Title1}\par\medskip
\begin{tikzpicture}
\begin{axis}\[width=7cm,height=4cm,
xlabel={Temperature \[\textcelsius\]},
ylabel={Solubility },
xmin=0, xmax=100,
ymin=20, ymax=40,
xtick={0,20,40,60,80,100},
ytick={20,40},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
\]
\addplot\[
color=blue,
mark=square,
\]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO\(_4\cdot\)5H\(_2\)O}
\end{axis}
\end{tikzpicture}
\begin{minipage}\[b\]{0.2\textwidth}
\centering
Uses real-time control to prevent voltage violations caused by sudden increase in \gls{pv} generation or change in load demand\\
$\rightarrow$
\end{minipage}%
\begin{tikzpicture}
\begin{axis}\[width=7cm,height=4cm,
xlabel={Temperature \[\textcelsius\]},
ylabel={Solubility },
xmin=0, xmax=100,
ymin=20, ymax=40,
xtick={0,20,40,60,80,100},
ytick={20,40},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
\]
\addplot\[
color=blue,
mark=square,
\]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO\(_4\cdot\)5H\(_2\)O}
\end{axis}
\end{tikzpicture}
\caption{Two Stage Overview with real time control}
\label{fig:Two Stage Overview}
\end{figure*}
答案1
- 由于代码中可选参数使用错误,您的代码片段无法编译。例如,错误地
\begin{figure*}\[ht\]
使用\begin{figure*}
[ht]` 等。 - 图像之间带有文本的箭头可以简单地绘制为
tizpicture
\tikzpicture
垂直对齐可以通过选项实现[baseline=(current bounding box.center)]
考虑到上述情况,图的前两行可以是:
\documentclass[twocolumn]{article}
\usepackage[version=4]{mhchem}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{arrows.meta,
bending,
tikzmark}
\begin{document}
\begin{figure*}[ht]
\pgfplotsset{% moved here for shortening of the MWE code
width=0.35\textwidth,height=4cm,
xlabel={Temperature [\textcelsius]},
ylabel={Solubility},
xmin=0, xmax=100,
ymin=20, ymax=40,
xtick={0,20,40,60,80,100},
ytick={20,40},
legend style = {font=\footnotesize, legend pos=north west},
ymajorgrids=true,
grid style=dashed
}
\tikzset{lbl/.style = {font=\small,
text width=0.2\textwidth,
above}
}
\textbf{Title 1}\\[1ex]
\begin{tikzpicture}[baseline=(current bounding box.center),
remember picture]
\begin{axis}
\addplot +[mark=square]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\tikzmarknode{A}{\coordinate (A) at (20,22);}
\legend{\ce{CuSO4\cdot{5}H2O}}
\end{axis}
\end{tikzpicture}
\hfill
\begin{tikzpicture}[baseline=(current bounding box.center)]
\draw[-Straight Barb, semithick]
(0,0) -- node[lbl]
{Uses a NLP to minimize Cost using a
battery degradation model} (0.22\textwidth,0);\\
\end{tikzpicture}
\hfill
\begin{tikzpicture}[baseline=(current bounding box.center)]
\begin{axis}
\addplot +[mark=square]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{\ce{CuSO4\cdot{5}H2O}}
\end{axis}
\end{tikzpicture}
\textbf{Title 2}\\[1ex]
\begin{tikzpicture}[baseline=(current bounding box.center),
remember picture]
\begin{axis}
\addplot +[mark=square]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\tikzmarknode{B}{\coordinate (B) at (35,39);}
\legend{\ce{CuSO4\cdot{5}H2O}}
\end{axis}
\end{tikzpicture}
\hfill
\begin{tikzpicture}[baseline=(current bounding box.center)]
\draw[-Straight Barb, semithick]
(0,0) -- node[lbl]
{Limits export/import capabilities in time frames
if voltage violations may occur and sets possible
reactive power compensation.} (0.22\textwidth,0);\\
\end{tikzpicture}
\hfill
\begin{tikzpicture}[baseline=(current bounding box.center)]
\begin{axis}
\addplot +[mark=square]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{\ce{CuSO4\cdot{5}H2O}}
\end{axis}
\end{tikzpicture}
%%%
\begin{tikzpicture}[overlay, remember picture]
\draw[-{Triangle[scale=0.6, bend]},
line width=3mm, gray, semitransparent]
(A) to[bend right=45] (B);
\end{tikzpicture}
\end{figure*}
\end{document}