I have a stackplot in Excel as shown below. I'm trying to generate the same plot using Python.
My code for the same is below.
x = ['d1','d2','d3','d4','d5']
labels = ['a','b','c','d','e']
sns.set(font_scale = 1.25)
plt.stackplot(x,gA,gB,gC,gD,gE,labels=labels) #gA,...,gE stores the percentage values
plt.legend(loc='upper left')
plt.title('Reason')
plt.show()
A sample y - gB
looks like below
+---+--------+
| | Reason |
+---+--------+
| a | 4 |
| b | 32 |
| c | 4 |
| d | 56 |
| e | 4 |
+---+--------+
I get a really strange plot when I run this.
What am I missing out?