question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make saving images from Interactive window easier

See original GitHub issue

Environment data

  • VS Code version: 1.33
  • Extension version (available under the Extensions sidebar): 2019.3.6558
  • OS and version: Win 10, 1703
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Relevant/affected Python packages and their versions: matplotlib maybe

Expected behaviour

Saving multiple images from the interactive tab by dragging to Windows explorer/Finder is easy and comfortable

Actual behaviour

Saving multiple images is rather bothersome, as each file has the same name (download.png) and has to be renamed before saving another file.

Steps to reproduce:

  1. Plot multiple images
  2. Drag them into the same folder

More Details

Maybe related to: microsoft/vscode-jupyter#1470

Currently it is possible to drag the image from the interactive tab to e.g. Windows Explorer to save it as download.png. Saving multiple images in this way is a bit painful, as it is necessary to rename them every time.

Is it possible to give each image in the interactive tab an alt-tag which would then be used as image name? If yes, I would suggest something that uses a ISO Time/Date (: would have to be handled somehow) and e.g. the “cell name”. Timestamp should be the time when the cell is executed.

ScriptName.py:
#%% [CellName] Comment
plot1() # ScriptName-CellName-1-TS
plot2() # ScriptName-CellName-2-TS

#%% Comment
plot3() # ScriptName-#Cell-1-TS
plot4() # ScriptName-#Cell-2-TS

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
oerplicommented, Apr 11, 2019

I am surprised that this isn’t a common scenario. I analyze some things, create a several plots and then save those that I would use to show my results to colleagues or similar.

For serious presentations/publications I would of course save them as pdf/svg but sometimes quick & dirty (low res png) is good enough.

0reactions
greazercommented, Oct 18, 2021

Thanks for the feedback! However, we don’t have plans on adding this functionality at this time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make saving images from Interactive window easier #1534
Currently it is possible to drag the image from the interactive tab to e.g. Windows Explorer to save it as download.png . Saving...
Read more >
How to save images from Python Interactive tab in Microsoft ...
But the answer here is that we don't have a way to do this currently. You can highlight it in the interactive window...
Read more >
The Comprehensive Guide to Saving Images for the Web
Learn about the diverse features of Photoshop's "Save for Web & Devices" command and best practices for saving images that are optimized for...
Read more >
GUIDE – The RIGHT WAY to save images from the web
GUIDE – The RIGHT WAY to save images from the web · 2.1.1 (1) Right Click on Image · 2.1.2 (2) Choose “Save...
Read more >
Save a picture or other graphic as a separate file
Right-click the illustration that you want to save as a separate image file, and then click Save as Picture. In the Save as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found