October 2018
Beginner to intermediate
676 pages
18h 30m
English
Here are the steps involved in plotting the required graphs:
x = [0, 1, 2, 3, 4, 5]y = [19, 12, 6, 4, 3, 2]y1 = [41, 67, 80, 89, 96, 100]
fig = plt.figure(figsize=(10,6))ax1 = plt.subplot(121) # first plotax2 = ax1.twinx() # share x axisax3 = plt.subplot(122) # second plotax4 = ax3.twiny() # share y axis
b = ax1.bar(x, y, label='Number of Defects')l, = ax2.plot(x, y1, color='g', lw=5, label='Cumulative Defects as %')
majorLocator = MultipleLocator(2)ax1.yaxis.set_major_locator(majorLocator)ax1.set(xlabel='Defect Reason Codes', ...
Read now
Unlock full access