我想比较两种动力选项的重量和体积。一种由 FC、电池和电机组成,另一种由 4 冲程发动机组成
我编辑了以下代码,但它没有给我所需的输出
\begin{tikzpicture}
\begin{axis}[ybar stacked,bar shift=7pt,ymin=0,ymax=30,symbolic x coords={Wight,Volume}]]
\addplot coordinates
{(Weight,0.375) (Volume,0.66)};
\addplot coordinates
{(Weight,8.885) (Volume,4.44)};
\addplot coordinates
{(Weight,5.4) (Volume,16.16)};
\end{axis}
\begin{axis}[ybar stacked,bar shift=-7pt,ymin=0,ymax=30,symbolic x coords={Wight,Volume}]
\addplot [fill=blue!50!gray] coordinates
{(Weight,13.064) (Volume,28.424)};
\legend{FC,Battery,Motor,4-stroke}
\end{axis}
\end{tikzpicture}
输出如图所示
我不希望这个大空间和轴用粗体书写,因为我认为它是双重书写,图例也是如此