I have two python lists - a (entries are strings) and b (numerical). I plot them with the following snippet (works perfectly) -
import matplotlib.pyplot as plt
plt.bar(names, values)
plt.suptitle('Average Resale Price (SGD) vs Flat Model')
plt.xticks(rotation='82.5')
plt.show()
Now I try to save the above figure -
plt.savefig('foo.png',dpi=400)
However I end up getting a white figure! How do I save the barplot ?