« Minimal Reproducible »

Home Tags About GitHub

save-img-in-plt

Published at 2024-01-15
Last update over 365 days ago Licensed under CC BY-NC-SA 4.0 langspythonmatplotlib

https://stackoverflow.com/questions/9622163/save-plot-to-image-file-instead-of-displaying-it

    img_plot = plt.imshow(color) # color is np.array
    plt.savefig('foo.png')
    plt.show()

« Minimal Reproducible »

Powered by Astro