Saving plots to desktop

How do I save a plot from my code to my desktop while using replit?

Replit Profile:

What do you mean by “plot”?


A graph. I use the plt.figure() function to create a plot. I wanted to save the figure without having to screenshot it.

1 Like

You can use
to save an image of your plot to your repl and then from there you could download it to your desktop.
I put it just before and it worked fine.


Thank you so much. This should make the process a lot easier.


Please mark this post as the solution.


Hello again, @ralphd2.
Another way which you can save the plots, though plt.savefig("name.png")may be easier, is to first stretch open the output window until you can see the controls at the bottom,

by default the output window may not display these.

Then click the save button


it’ll then bring up by default the home/runner directory
look for your repl’s name

Then, within that folder you can save the file as you wish

and then it should appear in your file tree, where again you can download it to your desktop. This way may add a few extra steps but could offer more versatility.

As a side note, if you experience issues with the output not working, as some other users have been reporting, consider using the Python Data Science template instead of the normal python one.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.