Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Notebook: How to copy paste image into MS word?

I tried to copy the image and paste them into MS word, but it didn't work.

I'm not sure if this is my problem, or the word's problem?

The images are at: https://cdn.rawgit.com/cqcn1991/Wind-Speed-Analysis/master/output_HTML/marham.html#5.3-Sectoral-Comaprison

enter image description here

The paste result (in MS Word), it's done by CTRL+C, CTRL+V:

enter image description here

I can only paste the text, not the image.

I experiment it with Medium and another web app. Medium works exactly like MS Word, while another is able to paste. I think the underlying problem may be that the image in Jupyter Notebook is too deep in divs? so it get escaped in Word?

like image 518
cqcn1991 Avatar asked May 19 '16 02:05

cqcn1991


4 Answers

Right Click on image and select "Create New View for Output" A new image file will appear. From there you can select the image and using the shortcuts CTRL + C and CTRL + V onto your document.

like image 84
Paul Bevillard Avatar answered Nov 06 '22 11:11

Paul Bevillard


As per the issue you raised on github: https://github.com/jupyter/notebook/issues/1496

I can get this to work if after copying from the notebook I do Ctrl+Alt+V (shortcut for paste-special) and then select either "bitmap" or "device independent bitmap" from the dialog that pops up

like image 40
Vince W. Avatar answered Nov 06 '22 10:11

Vince W.


You can drag the image on to OneNote and from there your copy/paste options are available for transfer into Word.

like image 26
Dawit Tegbaru Avatar answered Nov 06 '22 09:11

Dawit Tegbaru


Add plt.figure(facecolor='w') before you plot any figures because the default face color is black.

Then, just right click on the figure and past as normal figures.

like image 37
Zhihui Shao Avatar answered Nov 06 '22 09:11

Zhihui Shao