Copying Charts Reliably out of Numbers

Article summary

I generally like using Numbers on my Mac to create charts. I’ll put these charts into blog posts, emails, documents and diagrams when I need data to get my point across. Numbers has some foibles, but I find it produces much more attractive charts and graphs than Excel, and Excel can be pretty capricious as well in this area.

There is one impossible-to-live-with-problem that Numbers has which almost made me return to Excel. After creating a chart in Numbers, I copy and paste it to the tool I’m using to create my document or blog post. Unfortunately, and unforgivably, the copy buffer would only contain a portion of my chart: the title would be missing, the legend would be missing or clipped, even the titles on the axes would be missing.

Update, August 2017

Numbers (4.1 on OS X 10.12.6) now lets you easily copy a chart, including titles and legends, but what it puts in the paste buffer is a strangely low resolution image. It’s not even adequate for screen display at nominal size on a monitor.

However, if you Control-Click on the chart, launch Preview, and Select New from Clipboard, you get a nice PDF of the chart. Saving that image lets you select PNG, and voila, something good enough for your blog post.


The chart below is something I used recently in a post on Great Not Big. See the nice title, how the axes are properly labeled, and the two series of data are described in the legend? These kinds of things matter to me, and I make an effort to get them right.

Complete chart showing title, axis labels, and legend.
Complete chart showing title, axis labels, and legend.

Here’s how the same exact chart looked when I did the obvious copy/paste thing to get it out of Numbers. Not so good: lots of important stuff missing, and lots of wasted effort by me in making a nice chart.

Same chart, missing title, axis label and legend. Copy/paste fail.
Same chart, missing title, axis label and legend. Copy/paste fail.

This problem of incomplete images when pasting occurs in at least the following applications (I’m running 10.7.1 on a MacBook Air):

  • TextEdit
  • OmniGraffle
  • Word
  • Pages
  • Mail

After a lot of experimenting I came up with a reliable way of getting complete images of charts out of Numbers and into the graphic format I prefer (PNG). It’s a little tedious, but it works every time. (Maybe this is automatable with Apple Script?) In a nutshell, you paste into Pages, export to RTF, grab the PDF of the image and use Preview to convert it to PNG.

I’ve organized the full procedure by the application you need to use at each step.

Numbers

Select both the chart & legend
Arrange->Group
Edit->Copy

Pages

File->New
Edit->Paste
File->Save # Untitled.pages is fine
File->Export
Choose RTF
Next
Export # Untitled.rtfd is fine

Now you have an RTFD document next to your Pages documented, both called Untitled. If you’re not familiar with using Terminal and the basic UNIX shell commands, this next step might be confusing. My advice is to go read up on Terminal before trying this. Aimee is the name of my laptop and hence shows in my shell prompt.

Terminal

aimee: cd dir      # dir is the location of your Untitled documents

aimee: ls
Untitled.pages/
Untitled.rtfd/

aimee: cd Untitled.rtfd/

aimee: ls
pastedGraphic.pdf TXT.rtf

aimee: open pastedGraphic.pdf

Preview

File->Export

Format: PNG       # or JPEG, etc
Resolution: 92       # typically about right for computer monitors
Save

You should now have a PNG export of your chart with all of its data, titles, legends, etc. If you set the location properly (step 2 under Preview), then your PNG file will be in the same location as the temporary Untitled documents you created.

The last step is to clean up the temporary files you created, namely Untitled.pages and Untitled.rtfd.

Conversation
  • Ben Rousch says:

    I’m not familiar with Numbers, but OSX has nice screenshot functionality.
    http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X

    Specifically, if you press Command+Ctrl+Shift+4 you can draw a box around just the things you want to include in the screenshot and it will copy the resulting selection to your clipboard.

    I used to use Command+Shift+4 frequently. It also allows you to draw a box, but saves the selection to your Desktop as a .png.

  • Thiago C says:

    Thanks for sharing!

  • Comments are closed.