马赛克/Marimekko 图表;这个答案还有效吗?

马赛克/Marimekko 图表;这个答案还有效吗?

我找到了这个答案如何制作马赛克图表/Marimekko 图表? 并且曾经使用它来创建漂亮的图表。

在 Texlive-2014 下,使用 pgfplots 版本 1.10,我在前面提到的 url 上的示例中收到了很多空格。使用上述答案中的 mwe

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots, pgfplotstable}

\pgfplotstableread{
23 30 50 20
55 10 40 50
32 60 30 10
0 0 0 0
}\datatable

\pgfplotstableset{
    create on use/accumy/.style={
        create col/expr={\prevrow{0}+\pgfmathaccuma}
    }
}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    stack plots=x,
    enlargelimits=false,
    table/y=accumy]
\addplot [fill=orange!60,xbar interval] table [x index=1] {\datatable};
\addplot [fill=cyan!50,xbar interval] table [x index=2] {\datatable};
\addplot [fill=yellow!50,xbar interval] table [x index=3] {\datatable};
\end{axis}
\end{tikzpicture}
\end{document}

由此链接可以检索到结果图片,它既不是预期的结果,也不是原始结果。 https://drive.google.com/file/d/0BwwAsCc3wS5VbDNyYkZjSVVYdUU/view?usp=sharing

有什么建议吗?

相关内容