I am using the Python Interactive tab (similar to Jupyter notebooks) in Microsoft Visual Studio Code.
When I plot an image, I am unable to save it directly from the editor. There's no option to save it directly with the mouse, or to save it directly from the interface.
Is there a way to save it from the interface or should I only use matplotlib
's savefig method?
In my version (1.47.3) I can double click the image, which opens it in a separate tab for inspection.
One of the buttons in this tab is a save icon, which allows you to save the image in a format that depends on the file ending you choose. I've tried .png, but couldn't find an option to change resolution. .pdf or .svg saves it losslessly as vector graphic.
In the image below you can see what it looks like for me. (on Ubuntu)
Not fully sure if this counts as a full answer here on Stack Overflow. But the answer here is that we don't have a way to do this currently. You can highlight it in the interactive window and Ctrl-C to copy it out, but even that support is rather flakey at this point. If you would like to log this issue this would be the best spot to get it on our radar: https://github.com/Microsoft/vscode-python/issues We keep our issues open to the public so you can track when we work on it after it's filed there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With