super simple question but I've been stuck on it for too long and haven't found anything to help.
Using the following code I generate an image that I can see in spyder, but nevertheless when I call the save function, it saves an empty (all white) image.
x,y = np.meshgrid(xs, ys)
z = np.array(zs)
fig = plt.figure(figsize=(2,8))
plt.pcolormesh(x, y, z.T, cmap='RdYlGn')
plt.colorbar()
plt.show()
plt.savefig('test.png')
this is what I see in the IDE:
this is what gets saved: