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

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
The paste result (in MS Word), it's done by CTRL+C, CTRL+V:
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?

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.

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

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.

Apologies for posting on a dated thread but I was having a similar problem.
I had been using Jupyter in PyCharm and was unable to copy and paste it at all. I then found that if I opened the notebook in a browser (Chrome) using the localhost link then I could right click and copy and paste, or save, the image as you normally would be able to for any other.

It is possible both on Jupyter lab and Jupyter notebook to right-click on the graph and save it in .png format. Then you could use the image elsewhere.

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

Jupyter lab disables the browser right-click menu and implements its own menu. In Google Chrome you can download any extension which enables right-click. Then you can simply right-click on any inline figure and copy the image.
This is the extension that I use. https://chrome.google.com/webstore/detail/allow-right-click/hompjdfbfmmmgflfjdlnkohcplmboaeo
But the simplest way is to create a new new view for the output, but for longer notebooks it takes time.

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.

Related

Using highlighting and middle click for copy/paste in RStudio

In linux I frequently highlight text with the mouse to copy, and middle click somewhere else to paste. In RStudio, this does not work, forcing the use of Ctrl+C and Ctrl+V or right-click menus. I often want to quickly copy segments of text between the console, editor, and browsers. Is there a way to get highlight+middleclick working?
This problem has been noted by the RStudio developers and added to their list. Unfortunately, that was five years ago, so don't hold your breath...
There are a lot of alternatives to RStudio. I haven't tried them all but RKward supports middle clicks.

How to increase RStudio editor size?

In Eclipse, I am able to do Ctrl+M while I am typing in the editor to full-screen the editor and temporarily hide all the side-windows. Is there a way to achieve this in RStudio? The code editor portion of the window is very small and yet I don't feel like manually fiddling with the mouse to resize my console/plots/workspace windows.
The view menu doesn't offer much else than zooming in/out.
All shortcuts Alt+Shift+K
You can make the editor fill up the entire rstudio window with Ctrl+Shift+1. Also to restore.
To move between the panes, the shortcut is CTRL + number.
1 - source
2 - console
Adding shift to the shortcut makes that pane fill up the spaces.
The best solution I've found is to use a "source window", i.e. pop out the editor into a separate window temporarily:
This window can then be expanded to fill the whole screen:
Only way I know how is to click on the right hand side of the title bar of the source code section where it has 2 windows symbols. The right-most one expands the code window to the entire left hand side.
Instructions and documentation below from the R studio manual:
http://www.rstudio.com/ide/docs/using/console
If you're running on Linux, you can install RStudio Server, just for use on the same computer. It's almost exactly like the regular RStudio, but inside a browser. I prefer it because I can full screen, and can use the browser's Find in the console.

save webpage as a url file and open with chrome

How can I simply save a webpage in chrome as a text based url file that when clicked in finder opens the webpage in chrome?
Here is what I have so far found and tried: the following code:
[InternetShortcut]
URL=http://http://stackoverflow.com/
(it needs an empty line at the end too but I couldn't get that shown in the code above). When saved as a .url file and kept simply in my filesystem, and click on it it opens the webpage directly in safari (since I am on a mac with osx). I want this to open in Chrome, but changing the "open with" settings opens the file as a text file; it doesn't execute and take me to that webpage.
I was in your exact same situation Geoff, and I was able to find this after digging through a ton of forums.
Open up Chrome/Firefox and go to the web page you were wanting to save.
Look at the address bar.
Find the padlock icon that is just to the left of your URL string. It may look like a page, or a lock, or a lock with a yellow triangle.
Click and drag it to the Desktop and then drop it.
This will create a webloc file, and for me it shows a Safari icon as the file image, even says Safari is the default program to open it. However, when I click on it, it always opens up in Chrome! :)
Hope this helps.
Using Chrome Version 29.0.1547.76
OSX 10.9.2
https://stackoverflow.com/a/22768604/10258377
Thank you #AZRckCrwler.
I would like to make it easier to understand base on his answer.
Find the padlock icon that is just to the left of your URL string. It may look like a page, or a lock, or a lock with a yellow triangle.
You can see the circle that I marked, then drag & drop here.

Is it possible to launch an external image editor from Textmate?

Is it possible to launch an external image editor from the TextMate project drawer? I suppose the same concept would apply to launching any external editor from TextMate. Right now, if I right-click on the image file, I only have an option to open in Preview or Finder.
Thanks!
Yes. There is an (official) TM Bundle that does what you want--it's called "ImageBrowser." I installed recently and i have used it only once. It seems to work fine for the purpose you mentioned in your Question; in particular, it finds images in your current project and displays them in an image browser that runs inside TextMate.
You can get it from the Macromates SVN Repository.
TextMate respects the Finder's (well, LauchService's) "Open with" choice for each file. Whichever program would open when you double-click the file in Finder will appear in TextMate's contextual menu. Simply change this through the Finder's Get Info window for the file in question to the editor of your choice, and TextMate will respect it. It's dynamically populated, so you don't need to restart TextMate.
As far as I know, there's no method to specify a secondary program beyond the default.
I think no is the answer, but like Matt said, explore the usage of the Services menu.

Question About Icons and GUI For Notepad++ Lovers

In the notepad++ website there's a technique to change the icons with any other "ico" format image. Each icon has it special name in order to be detected by notepad++. For instance, the new file icon is: new_normal.ico. The open file icon is: fileopen_normal.ico and so on. But I can't find the special names for Synchronize Vertical Scrolling, Synchronize Horizontal Scrolling and Run a Macro Multiples Times (I can't even find them in the notepad++ homepage). Well basically I'm hoping that some notepad++ developer would see this question and tell me what are the name of those icons. Thanks in advance!
Why not email a notepad++ member? It's open source and on Sourceforge.
They have both a forum and mailing list.

Resources