How to easily plot graph, using (preferably) free software?

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

-
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

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)))
``````

Stackoverflow.com has a small ggplot2 user base. Otherwise, the ggplot2 Google Group is a great place to ask questions.

-
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

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

-

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:

to this

-

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.

-

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.

-
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

-

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

-
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 Grapher.app. 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