Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't copy figures to clipboard from jupyter notebook #129880

Closed
jheissb opened this issue Jul 31, 2021 · 22 comments
Closed

can't copy figures to clipboard from jupyter notebook #129880

jheissb opened this issue Jul 31, 2021 · 22 comments
Assignees
Labels
feature-request Request for new features or functionality notebook-clipboard notebook-output verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@jheissb
Copy link

jheissb commented Jul 31, 2021

Issue Type: Bug

in jupyter notebook, produce any plot, then select and try to copy to clipoard either by pressing ctrl-c or edit-copy.

It doesn't do anything and the clipboard remains empty. The only option is to save the figure to disk, which is not practical.
I had to go back to use the browser instead of VScode for jupyter notebooks.

VS Code version: Code 1.58.2 (c3f1263, 2021-07-14T22:10:15.214Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.72GB (22.12GB free)
Process Argv --crash-reporter-id 2f12ecf8-3564-49b2-8351-e7b4544d8b03
Screen Reader no
VM 0%
Extensions (11)
Extension Author (truncated) Version
atlascode atl 2.9.1
githistory don 0.6.17
gitlens eam 11.6.0
githd hui 2.2.4
vscode-github Kni 0.30.6
python ms- 2021.7.1060902895
vscode-pylance ms- 2021.7.7
jupyter ms- 2021.8.1054968649
cpptools ms- 1.5.1
vscode-commons red 0.0.6
vscode-yaml red 0.22.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspyt653:30270858
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30345471
vspre833:30321513
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscus158:30321503
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
vsccppwt:30329788
pythonvssor306:30344512
bridge0708:30335490

@vscodebot
Copy link

vscodebot bot commented Jul 31, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@jheissb
Copy link
Author

jheissb commented Jul 31, 2021

screenshot

Attached screenshot showing I can highlight the figure, but it is not getting copied to clipboard. tried ctr-c, right click and from the edit medu.

@rebornix rebornix added feature-request Request for new features or functionality notebook notebook-output labels Aug 2, 2021
@ceronvgabriel
Copy link

Hello, Is there any update in this feature request? We really need the feature to copy figures to clipboard, this help us when we want to add a figure to a document/article. That would be great, thank you very much.

@claudiaregio claudiaregio reopened this Oct 12, 2021
@claudiaregio claudiaregio reopened this Oct 13, 2021
@tanhakabir tanhakabir reopened this Oct 14, 2021
@rchiodo rchiodo reopened this Oct 15, 2021
@rchiodo rchiodo added the important Issue identified as high-priority label Oct 15, 2021
@roblourens
Copy link
Member

What do other clients do, copy it as html or as an image?

@ceronvgabriel
Copy link

ceronvgabriel commented Oct 15, 2021

What do other clients do, copy it as html or as an image?

At the moment I'm using Azure Notebooks, and what it let you do is to right click and copy from the context menu the image generated for example by matplotlib to the clipboard, then you can right click (or use ctrl+v) to paste it directly into a document, for example a Word document.

@natwille1
Copy link

Is this issue being worked on? It would great to have this copy/paste feature - it takes a while to have to save the images and it clogs up directories with tons of images.. Thanks!

@vitorbaptista
Copy link

Just chipping in that this feature would be very useful and sharing my current workaround. There are currently two methods of saving a picture to be used in another document:

  • Save to your local machine
  • Print-screen the image section (the Ctrl+Shift+PrntScr shortcut helps a lot)

Saving is slow to do for many pictures, and print-screen reduces the image quality. Being able to right-click and copy the image would be great.

@jordi-sastre
Copy link

This feature would be extremely useful. I have worked before with Atom+Hydrogen and it was possible to copy+paste or drag and drop images from the output panel. This made my life much easier. Now I'm using VSCode and I do miss a lot this feature. If I want to quickly copy an image elsewhere I need to either navigate to a directory and save it there or do a screenshot, which is not that practical.

@joelpaula
Copy link

Have the same problem. It really hinders sharing work results and collaboration. Saving as a work around is extremely tedious and time consuming.

@mika76
Copy link

mika76 commented May 27, 2022

Have the same problem. It really hinders sharing work results and collaboration. Saving as a work around is extremely tedious and time consuming.

I have figured out a bit of a workaround if you're interested - create a powershell cell and use the Set-Clipboard command with a #!share command - see this discussion: dotnet/interactive#1984 (reply in thread)

[Edit] I tried this with text results only, not sure it can be used with other result types...

@greazer greazer added the under-discussion Issue is under discussion for relevance, priority, approach label May 31, 2022
@amunger amunger modified the milestones: May 2022, June 2022 Jun 1, 2022
@pamzgt
Copy link

pamzgt commented Jun 17, 2022

This feature would be very useful! the workarounds are very annoying. It would be great to have it.

@AlFontal
Copy link

Indeed, this is definitely the number 1 feature that irks me the most in the VS Code Jupyter workflow!

@andreimargeloiu
Copy link

+1, this feature would be super useful!

@rebornix rebornix modified the milestones: June 2022, July 2022 Jun 29, 2022
@rebornix rebornix removed the under-discussion Issue is under discussion for relevance, priority, approach label Jul 7, 2022
@kerry-tarrant
Copy link

It would be great if there was a feature to right-click and copy/save my figures.

@amunger
Copy link
Contributor

amunger commented Jul 20, 2022

With the Jupyter extension installed and the latest vscode-notebook-renderers extension, there should be a new copy button that shows up on mouse hover over the output, which will place the image into the system clipboard.

Make sure you have the correct presentation selected, only png ouput is currently supported:
image
image

@amunger amunger closed this as completed Jul 20, 2022
@amunger amunger reopened this Jul 20, 2022
@amunger amunger closed this as completed Jul 20, 2022
@amunger amunger added the verification-needed Verification of issue is requested label Jul 25, 2022
@rzhao271 rzhao271 added the verified Verification succeeded label Jul 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality notebook-clipboard notebook-output verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests