![带有 pgfplots 的 3D 条形图](https://linux22.com/image/429986/%E5%B8%A6%E6%9C%89%20pgfplots%20%E7%9A%84%203D%20%E6%9D%A1%E5%BD%A2%E5%9B%BE.png)
我想画一个三维条形图。我用这个 MWE 代码画了二维图。能像最后一张照片那样画成 3D 吗?
最大误差:(来源)
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\pgfplotstableread[row sep=\\,col sep=&]{
interval & carT & carD & carR \\
Type A & 10 & 15 & 20 \\
Type B & 8 & 6 & 12 \\
Type C & 5 & 8 & 10 \\
}\mydata
\begin{tikzpicture}
\begin{axis}[
ybar,
bar width=.5cm,
width=\textwidth,
height=.5\textwidth,
legend style={at={(0.5,1)},
anchor=north,legend columns=-1},
symbolic x coords={Type A, Type B, Type C},
xtick=data,
nodes near coords,
nodes near coords align={vertical},
ymin=0,ymax=35,
]
\addplot table[x=interval,y=carT]{\mydata};
\addplot table[x=interval,y=carD]{\mydata};
\addplot table[x=interval,y=carR]{\mydata};
\legend{AA, BB, CC}
\end{axis}
\end{tikzpicture}
\end{document}
结果是:
我想要这个输出: