I know how to include basic hyperlinks, and usually I think that's all I want. But sometimes I'd like to include an actual graph, especially if much of my answer text relates to that graph.


Edit 27/10/2013: For the past couple of years I'd been getting along fine with IE8 (and subsequently, Google Chrome) under XP using the method outlined in my own answer below. But something's changed recently with Google NGrams charts, and neither my method nor any other approaches on this page seem to work now.

Maybe I'm no longer a total noob at this sort of thing, but I still need help!

share
    
This may sound really obvious and not what you are asking for, but I upload the image on my computer hard disk and then move on from there. –  Mari-Lou A Oct 27 '13 at 18:41
    
@Mari-Lou A: It's certainly not "really obvious" to me! If I right-click on an NGram webpage, Chrome gives me the possibility of selecting "Save as..." (with options to save as either "Webpage complete" or "HTML only"). But whichever I choose, I cant re-display the file created on my computer, and it's not accepted as a valid input to ELU's "insert picture" edit facility. I see tchrist creates things like ...i.stack.imgur.com/FbON7.png, but I can't see how to do that. –  FumbleFingers Oct 27 '13 at 20:31
    
I just went to ngram to try and I see what you mean! (I haven't used ngram for a while.) The only solution I can offer is to download a capture screenshot add-on and install it on your browser. I have "Awesome Screenshot" for Firefox. –  Mari-Lou A Oct 27 '13 at 21:35
    
I just ran an ngram and saw a link on the upper right to Embed Chart, but I don't know whether there's a way to make that work with Markdown here. –  Bradd Szonye Oct 28 '13 at 22:51
1  
@BraddSzonye No, that just produces an iframe tag, which Markdown doesn't allow. The issue is that Google produce SVG graphics in browsers which can handle it, like Firefox and Chrome, and use some clever Javascript in IE which doesn't actually work. So it looks like the only way is to screen-grab the image, crop that, save locally and then upload (which is what I've been doing). Bah. –  Andrew Leach Oct 29 '13 at 16:55
    
@Andrew Leach: Goddammit! I can (just about! :) do that, but unless someone comes up with a simpler method, I can see I won't be posting so many NGram charts in future. Ah well - at least it'll save me getting so many comments pointing out that NGrams can't always be trusted! –  FumbleFingers Oct 29 '13 at 17:09
    
@FumbleFingers Your method of copying the https://books.google.com/ngrams/graph?… URL and changing graph to chart still works. –  Gilles Nov 8 '13 at 17:42
    
@Gilles: Not so far as I can see. Are you definitely managing to do it using the Chrome browser? I no longer have the option of right-clicking on the graphic to select "Copy image URL", and if I try using the actual address bar contents (with or without changing graph to chart), I just get "Failed to upload image: The format is not supported" when I try to add a picture (from the Web, since I can't figure out how to save the image as a file on my local computer either). –  FumbleFingers Nov 8 '13 at 18:03
1  
@FumbleFingers Yes, I just made this post, in Chrome. The original URL from the image was http://books.google.com/ngrams/chart?content=probabilit%C3%A9+que%2Cprobabilit%‌​C3%A9+pour+que&year_start=1800&year_end=2000&corpus=19&smoothing=3&share=&direct_‌​url=t1%3B%2Cprobabilit%C3%A9%20que%3B%2Cc0%3B.t1%3B%2Cprobabilit%C3%A9%20pour%20q‌​ue%3B%2Cc0. You may have to download it first as Google seems to put some usage rate limitation which may block SE's servers. –  Gilles Nov 8 '13 at 18:15
1  
@FumbleFingers If you find you need to save the image locally, change graph to chart in the URL bar and hit Enter, then right-click on the image and “Save As”. –  Gilles Nov 8 '13 at 18:16
    
@Gilles: oic. It doesn't work the same as it used to though. I no longer have the Right-click -> Copy image URL option on the actual NGram webpage, but I can copy the contents of the address bar to another browser window (after changing graph to chart). That gives me just the graphic, on which I can select Copy image URL. I'll amend my own answer to reflect this change. –  FumbleFingers Nov 8 '13 at 18:35
add comment

3 Answers 3

Copy the URL for the ngram image

ngram

(To get this, right-click or ctrl-click on the image; the options that come up will depend on your browser, but if there isn’t literally a “Copy Image URL”, there should be something like “View/open image (in new window/tab)”; then whatever appears in the address bar of the window/tab with the image in is the URL you want.)

Then add it to your question using Markdown syntax for images:

![Google ngram for Atlantis vs. El Dorado][1]

[1]: http://ngrams.googlelabs.com/chart?content=Atlantis%2CEl%20Dorado&corpus=0&smoothing=3&year_start=1800&year_end=2000)

markdown

Alternatively, if you don’t want to remember this syntax, there’s a little image icon at the top of the answer box; just click it, ask to give an image “from the web”, and then paste the URL in its source box.

(There’s a slight difference in the results of these two options: the first procedure gives a live image, which may change if Ngrams updates its data or styling; the second procedure makes a copy of the image and hosts it elsewhere, so will fossilise whatever Ngrams currently produces.)

share
1  
Ty. Took a while, but I got there in the end! –  FumbleFingers May 20 '11 at 17:21
2  
No longer an image –  mplungjan Apr 29 '13 at 9:41
add comment
up vote 7 down vote accepted

bingo!

I'm using IE8 under XP, and it doesn't seem to have your 'Copy URL image' option.

But after a bit of trial-and-error (not to mention eventually noticing that crucial exclamation mark in front of the link within your text) I found I can get what I want by manually changing ...googlelabs.com/graph... to .../chart... in the actual link.


EDIT: Thanks to Gilles's comments showing that I can still use a method loosely based on the above. It's a bit long-winded, so I'll write it down in case I forget (or if anyone else has the same problem). Here's what works for me...

  1. Copy the address bar to a new browser window, changing graph to chart as above.
  2. Right-click and select Save image as... (a PNG file) within the new window.
    (the location/filename aren't important, as it can be deleted after step 4).
  3. In the post where you want the graphic, select Add picture... from my computer
  4. That opens a "browse" control, within which you can select the file just saved.
    (then delete the file, or just use the same filename/location every time and overwrite)
share
    
Thank you for the guide, it does really work, save a lot of bother. However, the PNG graph fails to display any of the written data, such as which corpus was employed. Am I right in supposing that information will have have to be typed, gasp, by hand? Thank you in any case. (FYI I've only just worked it out!) –  Mari-Lou A Nov 15 '13 at 9:19
    
@Mari-Lou A: I expect a browser extension (there's one for Chrome called Webpage Screenshot Capture) can capture the browser window into a local graphic file - in a format that will be accepted by the SO "Insert image" edit button. I might have a look at that myself later, but I'd have thought unless you're prepared to capture and post up your entire screen, it would be a browser-specific method. –  FumbleFingers Nov 15 '13 at 13:39
add comment

An additional way (to complement FumbleFingers' method) is to:

  • save the image, using your browser 'save image...' (right click to get a menu)
  • then use the tool under 'Your Answer' for 'Image ' (after 'link', 'quote', and 'code sample'), and upload the saved image.

image downloaded from Google Ngrams

Created from the following:

http://ngrams.googlelabs.com/chart?content=needn%20%27%20t&year_start=1900&year_end=2008&corpus=0&smoothing=3

(similar to FumbleFingers').

This method avoids having to create the markup ourself. It saves what you've seen, rather than a link to google Ngrams, which may be desirable or not. It is good to make the additional link explicit then so the reader knows how it was created.

You can do -any- image this way, a screen shot or some other graphing program or anything. Also, You don't have to save the image, you can link directly to it (use the 'from the web' option on the SE editor image tool.

share
1  
Thanks very much for that info. It'll be a useful reference one day when I want to be really creative, and post an image of something other than an NGram chart! –  FumbleFingers May 21 '11 at 21:50
2  
Addressing your last paragraph, one of my PCs has the Windows "Snipping Tool", and my Mac has Preview, which allows you to create a new image from a screen shot. –  J.R. Oct 27 '13 at 23:24
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .