You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] add toggle to diable "expand image" feature and restore the pervious behaviors #3307
the DPI of the plots in the Plots windows seem very high, but the png image file saved via "export to different formats" has a much lower DPI.
This new "expand image" feature completely change the behavior of the vs code. I understand this feature might be convenient for some users, but I'd like to use code to explicitly set the dpi and save plots.
Please consider adding a toggle for it or at least disable the double-click and restore the "drag to desktop" behavior.
changed the title [-]PNG image got cut off while saving via Plots window[/-][+][Feature Request] add toggle to diable "expand image" feature and restore the pervious behaviors[/+]on Jun 26, 2019
Rich Chiodo (@rchiodo) The thing is this "expand image" completely change the behavior of the plot. Right now if I double click, it will jump to a new window and also I could no longer drag any plots to my desktop directly.
I really really like the way it was... This overcomplicated my workflow a little bit.
Is there any way to disable all of those new features? I checked the settings and didn't find it.
Sorry, there is no easy way to disable this feature. We reworked how Jupyter returns images. Didn't even realize you could drag the images to your desktop. That's pretty cool.
There is a way to disable it in your code/interactive window though.
Run this line of code after your start the interactive window:
@StevenLi-DS I just submitted a fix for this. Our insider's build will have the fix in about an hour.
There's a new setting: 'enablePlotViewer' that turns on/off the expand image button. With it off you should be able to drag pngs out of the interactive window again.
I also fixed the png scaling when exporting to png if you continue to use the plot viewer.
If this feature will indeed be the default setting in the future, it might be better to set the plot algin to the left than the center in case of the following:
There's a new setting: 'enablePlotViewer' that turns on/off the expand image button. With it off you should be able to drag pngs out of the interactive window again.
This has already been implemented in the insider's build. We generally add the 'sign-off' label when something moves to insider's but hasn't shipped in the general release yet.
Issues with the 'data-science parking lot' or 'parking-lot' are in limbo.
Issues with the 'backlog' label are stuff we're working on for the next release.
We close issues when the ship in the general release.
Activity
stevenlis commentedon Jun 26, 2019
Btw, please please tell me there is a way to disable this "expand image" function.
rchiodo commentedon Jun 26, 2019
Not sure what you mean by 'expand image'. Did you mean the little icon that appears on top of the plot?
Do you have a repro for generating the image? It works with the plots I've created.
rchiodo commentedon Jun 26, 2019
Oh 'expand image' means the button. Didn't realize that's what the tooltip said.
Why do you want to disable the 'expand image' button? Is it getting in the way somehow?
rchiodo commentedon Jun 26, 2019
This might be mac only issue. Could be our dpi conversion isn't working correctly.
rchiodo commentedon Jun 26, 2019
The 'expand image' button should only appear when you mouse over the plot.
[-]PNG image got cut off while saving via Plots window[/-][+][Feature Request] add toggle to diable "expand image" feature and restore the pervious behaviors[/+]rchiodo commentedon Jun 26, 2019
Sorry, there is no easy way to disable this feature. We reworked how Jupyter returns images. Didn't even realize you could drag the images to your desktop. That's pretty cool.
There is a way to disable it in your code/interactive window though.
Run this line of code after your start the interactive window:
We'll look into adding an official setting.
rchiodo commentedon Jun 26, 2019
Sorry that last comment was too quick. Should have said format = 'png'
stevenlis commentedon Jun 26, 2019
Rich Chiodo (@rchiodo) Thx a lot. The code works.
rchiodo commentedon Jun 26, 2019
The png image saving works for me on Windows. Need to test on mac/linux to see if it's a dpi issue or not.
stevenlis commentedon Jun 26, 2019
I just tried with another plot. It has the same issue:

rchiodo commentedon Jun 26, 2019
And you're running on mac, right?
stevenlis commentedon Jun 26, 2019
No... I'm on windows 10. I think the environment data shows that right?
rchiodo commentedon Jun 26, 2019
Note to self:
This might work out better than trying to convert the size of the svg ourselves:
https://spin.atomicobject.com/2014/01/21/convert-svg-to-png/
rchiodo commentedon Jun 28, 2019
@StevenLi-DS I just submitted a fix for this. Our insider's build will have the fix in about an hour.
There's a new setting: 'enablePlotViewer' that turns on/off the expand image button. With it off you should be able to drag pngs out of the interactive window again.
I also fixed the png scaling when exporting to png if you continue to use the plot viewer.
stevenlis commentedon Jul 6, 2019
If this feature will indeed be the default setting in the future, it might be better to set the plot algin to the left than the center in case of the following:
stevenlis commentedon Jul 10, 2019
I just saw a new release. Have this 'enablePlotViewer' implemented?
rchiodo commentedon Jul 10, 2019
No that was a release for some specific bug fixes. It doesn't have the enablePlotViewer bits in it. That's only in the insider's build.
You can see what was fixed in the changelog for the release branch:
https://github.com/microsoft/vscode-python/blob/release/CHANGELOG.md
Looks like a fix for a/b testing.
stevenlis commentedon Jul 23, 2019
Rich Chiodo (@rchiodo) Hi, man. Do you have an approximation time for this feature implementation? Meanwhile, could you guys consider reopen this issue microsoft/vscode-python#6473?
rchiodo commentedon Jul 23, 2019
This has already been implemented in the insider's build. We generally add the 'sign-off' label when something moves to insider's but hasn't shipped in the general release yet.
Issues with the 'data-science parking lot' or 'parking-lot' are in limbo.
Issues with the 'backlog' label are stuff we're working on for the next release.
We close issues when the ship in the general release.
I also reopened the other issue.