I create a scatter plot, then plot it, save it to a file, load this file back and try to show the image. Why do I get an empty image?
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from PIL import Image
plt.scatter(x,y)
plt.show()
Then I save the image:
plt.savefig("./image.png")
Load it back:
img = mpimg.imread("./image.png")
img.shape
(288, 432, 4)
And when I plot it I get an a blank image, why?
plt.imshow(img)