Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to plot a graph, given some data, where on X axis will be names of data and on Y axis those data, and it will be given by a table, and it will be line graph with the data connected. If there was a possibility to draw more data into one graph, it's even better.

I know MS Excel can do exactly that, but I don't have MS Excel anymore.

I have installed R and tried to learn it, and I can do things like histograms, but I still have no idea how to do basic 2D graph with given data. It's like R was not build for this...

I think mathematica can do that somehow, but I don't have mathematica too.

edit: I will also add I am using Mac OS X, but I have linux and windows VM too, so the system doesn't really matter

edit2: as Idigas asked, I would more preferred programming than spreadsheed solution, but I don't care that much

share|improve this question
You want a spreadsheet solution or a programming solution ? – Rook Feb 2 '10 at 0:56
Idigas: can be both I guess, I would prefer programming solution though, because it's "cleaner" – Karel Bílek Feb 2 '10 at 1:13
Why not scilab ? It's free ... works nicely ... – Rook Feb 2 '10 at 1:14
up vote 5 down vote accepted

Try R again. This time, use ggplot2. Here's an example of data points snagged from the website.


That graph was done using the built-in mtcars dataset, with the following code:

> p <- ggplot(mtcars, aes(wt, mpg))
> p + geom_point(aes(colour = factor(cyl))) has a small ggplot2 user base. Otherwise, the ggplot2 Google Group is a great place to ask questions.

share|improve this answer
If you are using R, this is a great suggestion, but Karel sounded as if R was picked out of desperation in the hope that it was a path to a graph solution, not because of any real familiarity with R. – DaveParillo Feb 3 '10 at 23:40
I guess I took Karel's desire for a programming solution to heart, and I stand by my answer. Importing a text file into an R data frame and plotting in ggplot2 is IMHO the best programming solution, with matplotlib (suggested by Benjamin) as a close second. – fideli Feb 4 '10 at 5:50
I am looking at my older questions and I have found this one again. I learned R in the end, really anything is possible there, thanks for your solution. The only thing I don't like is the sometimes really weird syntax. – Karel Bílek Aug 9 '10 at 12:35
Agreed on syntax. It's the main thing I have against using R or suggesting it. – fideli Aug 16 '10 at 13:13

You could always use google docs? It has a spreadsheet application with similar functionality to excel, ie can draw graphs based on data tables. Just click Insert -> Chart

alt text

It is entirely online, and does not require downloading of any software. Also supports sharing / collaboration.

share|improve this answer

If you are looking for a solution you can program, try gnuplot. Many programs like R or octave can interact with gnuplot. Or you can run gnuplot standalone. It can read text files containing data and render them as plots. As far as line plots go, it can do anything from this:

bivariate example

to this

world map

Some useful links:

  1. Making plots using Ocatve, gnuplot & LaTex
  2. Demo scripts for gnuplot 4.2
  3. Gnuplot tutorial
share|improve this answer

You might want to give matplotlib a try.

matplotlib uses python, so you can do complex computation programatically and also directly access existing modules for e.g. linear algebra and mathematical functions. Heck, you can even do symbolic math in python.

matplotlib has an convenient front-end (pylab) modeled much after MatLab(tm) or gnuplot that also makes it very usable interactively.

enter image description here

share|improve this answer

Openoffice is probably the "best" alternative to MS Office. It will do pretty much anything that MS Office can, although perhaps not quite as elegant in some cases.

share|improve this answer
If you are used to spreadsheets, I would go with openoffice. It's intended to emulate excel. – DaveParillo Feb 2 '10 at 3:18

One other alternative is Google Chart Tools

share|improve this answer

I found out Plot (mac os x only) is the thing I really like the most so far.

share|improve this answer
You like it better than Grapher? – waiwai933 Feb 2 '10 at 1:26
OK, now I declare myself idiot, because I totally forgot about existence of Resubmit this comment as a new answer and I will accept it as the best answer. sigh – Karel Bílek Feb 2 '10 at 1:33
oh, maybe not. more than I play with both, I really like Plot more. – Karel Bílek Feb 2 '10 at 1:47

You must log in to answer this question.

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