Background There are several questions addressing how one can plot 3D data on a 3D plot using matplotlib. Such as Link 1 and Link 2
What I want is, a 3D looking stacked bar chart using a 2D data. Such stacked plots can be created using other tools conveniently (LibreOffice Calc) e.g.
Problem
How can I produce similar 3D effect using Matplotlib in a 2D plot. I have produced a 2D stacked barchart using Matplotlib as shown below
To be specific, I am looking to get information regarding packages/tools/themes/options that would allow me to achieve this in a 2D plot environment.
Additional information
Generalized code used to produce this 2D plot is as follows:
ax.bar(X, Y1, alpha=1, label="Y1", hatch='/', color='r') ax.bar(X, Y2, bottom=Y1, alpha=1, label="Y2", color='g', hatch='.') ax.bar(X, Y3, bottom=Y1+Y2, alpha=1, label="Y3", hatch='\\', color='b')
Data used to create this is given
- Using Link 2, by setting the y-axis to be constant, I have produced the following plot (Thanks to the community members for helping me in refining the question)