Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling right click copy for ipython plots?

Is there a way to enable matplotlib/ipython so I can right click my plots (in Chrome) and copy then paste elsewhere such as MS Word etc?

I know I can code and save to image etc, but often when I am playing around investigating data it would be very useful to just copy / paste into a document for safekeeping and reports.

EDIT: Problem seems to be using MS Word (2010) and any dynamic image from any Browser (IE/Chrome), If I use other progs like Write it works okay. I found some advice to change the "Pasting from other programs" option in Word settings but it has no effect.

Also another article says the problem is based on the contents of the "HTML Format" format stored in the clipboard.

Guess I need to post this question elsewhere seems to be an MS Word issue!

like image 495
mrkbutty Avatar asked Aug 29 '15 10:08

mrkbutty


People also ask

How do I copy a plot from Jupyter lab?

Hold down shift while right-clicking the plot. Select "Copy image"

What does %% capture do?

Capturing Output With %%capture IPython has a cell magic, %%capture , which captures the stdout/stderr of a cell. With this magic you can discard these streams or store them in a variable. By default, %%capture discards these streams. This is a simple way to suppress unwanted output.

How do I copy a chart from Jupyter notebook to Word?

Right click on the image in your Notebook and choose 'Save image as ...'. You may now insert the saved image in your MS word document.


2 Answers

If you control-shift right click, it'll return to the standard Chrome context menu instead of the iPython one.

like image 54
TheProletariat Avatar answered Sep 24 '22 06:09

TheProletariat


If you're using ipython notebook (which I guess you must be, since you're mentioning using Chrome), you can just right-click on your graph and choose Copy Image then paste into whatever software

like image 43
Diziet Asahi Avatar answered Sep 25 '22 06:09

Diziet Asahi