79393665

Date: 2025-01-28 11:47:22
Score: 3.5
Natty:
Report link

For anyone who has saved a figure as an image and wants to do this without using pickle:

Have you figure created in the first instance, ready to be saved as a png image. You can save with:

fig.savefig(filename)  

When it comes to loading that figure in subsequent instances, you can run:

fig = plt.imshow(plt.imread(filename)).get_figure()
Reasons:
  • RegEx Blacklisted phrase (3): Have you figure
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: GuyReading