After importing the laptop_defect file, I plotted 3 graphs for 1) Defects over time 2) Opportunities over time 3) defect rate with mean rate and limits over time. I was wondering how can I combine all 3 graphs in 1 figure?
Here's what I have so far:
import pandas as pd
laptop_defects = pd.read_excel('/content/Data_Analysis_Project.xlsx')
laptop_defects
import matplotlib.pyplot as plt
plt.plot(laptop_defects.Defects)
plt.plot(laptop_defects.Opportunities)
Calculate Defect Rate
laptop_defects['Defect Rate'] = round(laptop_defects['Defects']/ laptop_defects['Opportunities'] * 1000000,0)
laptop_defects.head()
plt.plot(laptop_defects ['Month ID(YYYYMM)'], laptop_defects['Defect Rate']);
plt.plot(laptop_defects ['Month ID(YYYYMM)'], laptop_defects['Mean Rate']);
plt.plot(laptop_defects ['Month ID(YYYYMM)'], laptop_defects['2 Sigma limit']);
plt.plot(laptop_defects ['Month ID(YYYYMM)'], laptop_defects['3 Sigma limit']);