I'm trying to plot 2 scatterplots next to each other using pyplot, but I can't get it to work.
x1 = list(stablepdfs.keys())
y1 = list(stablepdfs.values())
plt.scatter(x1,y1)
plt.title('Size of Succeeded vs Failed Pdfs')
plt.xlabel('Pdf Size in MB')
plt.ylabel('# of Pdfs')
plt.subplot(211)
#-----------------------------------
x2 = list(unstablepdfs.keys())
y2 = list(unstablepdfs.values())
plt.scatter(x2,y2, c='r')
plt.title('Size of Succeeded vs Failed Pdfs')
plt.xlabel('Pdf Size in MB')
plt.ylabel('# of Pdfs')
plt.subplot(212)
plt.show()
However, I only see one plot.
Interestingly, when I reverse the order of the code and plot the other one first, now I am only able to see the other plot.
x2 = list(unstablepdfs.keys())
y2 = list(unstablepdfs.values())
plt.scatter(x2,y2, c='r')
plt.title('Size of Succeeded vs Failed Pdfs')
plt.xlabel('Pdf Size in MB')
plt.ylabel('# of Pdfs')
plt.subplot(212)
#-----------------------------------
x1 = list(stablepdfs.keys())
y1 = list(stablepdfs.values())
plt.scatter(x1,y1)
plt.title('Size of Succeeded vs Failed Pdfs')
plt.xlabel('Pdf Size in MB')
plt.ylabel('# of Pdfs')
plt.subplot(211)
plt.show()