# How can I create nice graphs automatically?

Is there any ready-made software that can do this? Alternatively, any recommendations for other software that does something similar? I know this is not really a statistics question, but I feel very strongly that data should be presented in a neat and appealing way in order to be effective so I think this question would be uesful to some people.

Update (29/12/11):

Thanks for all the responses to this question, I really appreciate all your suggestions. By automatically, I mean that I key in the data & the graph gets automatically updated.

The purpose of my project is to collect 6-10 sets of data daily (or perhaps 2x daily) over an indefinite period of time, and I want to find a way to represent the data in a website (similar to the Steam link that I provided above), while the user backend is simple enough for a non-technical user to handle. If you have any more suggestions, please add to the answers! Thanks again!

• If you want to to publish your plots on a webpage you should use some javascript lib for that. Like the Google Chart Tools, Flot or Raphael – audijenz Nov 22 '11 at 15:45
• It seems to me there are two questions: producing neat graphics in an automatic manner. I would add that those graphics should be meaningful and not lead to subjective or perceptual biases (I can see four pie charts out of the six graphics that come up with the given URL). As you tagged this question with interactive-visualization, what do you have in mind? Something like protovis or its successor d3.js? Easy to set up with csv or JSON data, but what about your data? – chl Nov 22 '11 at 21:18
• Steam's graphics look nice but leave out important things. For example, the time series graphs don't give any visual cues about the horizontal axis (I'd recommend tick marks at least). – David J. Dec 6 '11 at 22:56
• I don't agree with the argument: "if you want to publish plots on a a webpage" then "you should use a JS library". If you need a graph that is only available via R or SPSS, what are you going to do? If you want to dynamically generate graphs for a web page, then, if you can, using Javascript can be nice; but still, that isn't a sufficient reason. – David J. Dec 6 '11 at 22:59
• I can't offer you useful recommendations unless I ask a clarifying question. I need to know what kind of data you have, where it is stored, and what you want to do. Let me know and I can offer some better suggestions. – David J. Dec 6 '11 at 23:49

You're concerned with both the generation of graphs automatically and the creation of nice charts.

The linked page has rather basic charts with decent typography and a decent color scheme. Any chart decent software can make those, so I think that you just need the right parameters for whatever software you use.

Color scheme: Color scheme generators can give you a pleasant, potentially cliché color scheme.

Graphic design:Timothy Samara gives you a list of 20 rules and ways to break them. If you apply them all without breaking any of them, you will have a lovely, potentially cliché design.

Typography: Designing with Type is my favorite introduction to typography.

• +1 for a constructive answer. Automatically generated and attractive design are not contradictory; it is just much harder. – Darren Cook Nov 25 '11 at 0:55
• Automatic generation makes it way easier to make attractive graphs. I don't know what Wayne's talking about. – Thomas Levine Nov 27 '11 at 6:07

You cannot create nice graphs automatically, any more than you can create nice text automatically, or a nice drawing, or good food, or pretty much anything else.

Making nice graphs (or nice anything) requires talent, effort and understanding.

There are programs (see other replies) that can help you make nice graphs, just like (say) it is easier to cook when you have good knives and a nice stove, or to write a novel with a good word processing package. But good tools aren't enough.

Dozens of programs can create attractive, clear graphs: R, Igor Pro, gnuplot, SAS, even Excel. The key ingredient is a user who understands the data, understands what needs to be conveyed to a particular audience, and does some study about aesthetic/perception issues.

Some programs have more flexibility than others (R and Igor Pro are very flexible), and some programs/packages have more attractive defaults (e.g. the ggplot package in R), but the bottom line is that "automatic" and "nice graphs" are contradictory. In my opinion.

EDIT: As pointed out in the comments, "automatic" may refer to the updating of a graph when new data comes in rather than to automatically making meaningful, attractive graphs in the first place. In that case, most solutions that let you make attractive graphs can be automated to update a graph with new data. Of course, if the data changes dramatically over time, your original design may not work well and the graph may become less understandable or attractive.

• Never heard of Igor Pro. The defaults in SAS 9.2 are not bad at all; a quantum jump for SAS. – Peter Flom - Reinstate Monica Nov 23 '11 at 0:06
• I think the key aspect of his question is not just generating graphs; it is about generating them automatically (programatically) as the underlying data changes. Some tools are easier than other when it comes to connecting them up programmatically. – David J. Dec 6 '11 at 23:00
• I am surprised to see Igor Pro mentioned as comparable to R and the others you mentioned. (This is the first I've heard of it.) – David J. Dec 6 '11 at 23:03
• Automatic and nice graphs are not necessarily contradictory. Here's an example: once you have an idea of the data that is flowing in, you may want to setup an automatically updating visualization. This can and often is automated. And done well. Besides, what is the alternative? Have a human update the graph every single time the data changes? – David J. Dec 6 '11 at 23:09
• @David, Peter: I used to use Wavemetrics' Igor Pro, and it is a very good scientific analysis program. Their staff is outstanding, and the graphs are very customizable. It can be totally GUI driven, but everything is translated into its underlying language, which you can access, save, modify, etc. R is free, though, and has thousands of packages rather than dozens, so I keep Igor Pro around, but use R. I still highly recommend it, and you can get more info at wavemetrics.com. – Wayne Dec 7 '11 at 15:55

Just googled this topic and came across a techcrunch article regarding visual.ly , a company that automates infographic generation for brands like Nat Geo, The Atlantic, GOOD Magazine CNNMoney.com, and Ebay.

Their website indicates they will eventual.ly allow anyone to create these infographics.

Hope this helps.

• Very cool resource, thank you! They only have two blog posts as of 12/13/2011 but they are both IMO very good and informative. – Andy W Dec 13 '11 at 13:35

You may use php GD to make your web server create directly the images from the data files.

A nice (and free) tool for web publishing of graphs is Google Charts. You can connect to data in real time. Check it out: http://code.google.com/apis/chart/

Have a look at Highcharts.

Highcharts is a charting library written in pure JavaScript, offering intuitive, interactive charts to your web site or web application. Highcharts currently supports line, spline, area, areaspline, column, bar, pie and scatter chart types.

There is a nice demo page.

I've had good luck for this using tools like R that let you program around how your charts look and–for websites–the Google Chart Tools (or other javascript-based chart tools, e.g., d3, jscharts, and I think the site you are looking at is using Fusion Charts) for exactly this sort of problem.

With R what you do is you set up the basic way that you want the chart to look. R is highly customizable (with somewhat hideous defaults, though not as bad as, say, MS Excel) and so you write a script that reads the data from a particular location or source and tweaks the values. It can change around where the axis are, the tick marks, where you place the median, and any tags that go with it. This isn't perfect, but you can use programming logic and with some careful choices get things to look pretty good consistently.

With the javascript variations (where you can get charts that look similar to the ones listed) you just set up the code that will display the chart and where it gets its data. So you can create a service (e.g., a webservice of some variety) that retrieves/processes the data and then feed this to the chart API. The downside is that you get less customization in this and sometimes getting it into the format expected by the API is painful, but the defaults tend to look pretty good, you can easily put the result on a webpage, and some of the APIs give you some additional visual candy (e.g., like the ones on the site you linked to).

The Steam site uses a Flash plugin to draw graphs. If you want to draw using statistical data, use R software. If you are expert at Javascript, you'd better use extjs to draw your graph.