October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following are the steps to plot a stacked plot:
x = np.array([1, 2, 3, 4, 5, 6], dtype=np.int32)Apr = [5, 7, 6, 8, 7, 9]May = [0, 4, 3, 7, 8, 9]June = [6, 7, 4, 5, 6, 8]
labels = ["April ", "May", "June"]
fig, ax = plt.subplots()
ax.stackplot(x, Apr, May, June, labels=labels)ax.legend(loc=2)
plt.xlabel('defect reason code')plt.ylabel('number of defects')plt.title('Product Defects - Q1 FY2019')
plt.show()
Read now
Unlock full access