[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: publication quality graphs



Hi Stuart,

Stuart Prescott wrote:
[...]
* OOo calc
Ha. Nice thought. Produces graphs that look as bad as M$Excel but can't
even handle X1 Y1 X2 Y2 data (only X Y1 Y2). Non-starter even for just
having a "quick look" at data, even if it does meet the "project"
paradigm.

Maybe this will improve in the upcoming version 2?

* xmggrace
It can't read in any of my data files. Bit of a showstopper, really....
I almost always have data with columns: X Y1 Y2 Y3... or X1 Y1 X2 Y2 X3
Y3... and I *always* have text column headings labelling the data. It
chokes on this sort of thing and I'm not going to manually import
hundreds of individual files (or columns piped through tail +1 | cut -f
etc) through that tedious import dialogue.

I use xmgrace for my 2D plots, of which most are in either XY or XY1Y2.. format, and they plot perfectly. I do find that xmgrace is limited by the lack of automatic column naming, but with most files I know which column is which. There are some data files that have a top row that xmgrace gets confused by, but I either `vim $file;dd;:w;[play in xmgrace];u;:wq` or just import as XY and remove the top line from the dataset.

If you want to retain the column titles, you could try adding a # at the start of the line - as far as I can tell here, that causes xmgrace to ignore that line and everything works perfectly. That said, my data is space-delimited, but I can't see why it shouldn't handle tab-delimited. And if you're exporting from Calc, then I can't see why you couldn't export differently if it is a problem, for new data at least.

* scigraphica
Importing X1 Y1 X2 Y2 data into a sheet causes the data to be truncated
at the number of rows in X1. Column headers are imported, but if more
than one column has the same name then only the left-most column is used
when you come to graph that dataset.

I have played with scigraphica in the past, specifically because of its interactive 3d graphing. However I've got my scripted gnuplot working now, and its far easier than setting up all the file parameters in a GUI program each time - although I think scigraphica has/had a scripting interface.

* gnuplot
I'll confess that I have a deep seated aversion to gnuplot that dates
back to my undergraduate days which is probably unfair. Having said
that, I do prefer to be able to manipulate the graphs in real time *and*
be able to save the settings and data as a project. With gnuplot you can
do one or other (either run it from a script which is pretending to be a
"project" file or some sort, or you can do it in real time.)

This is my current 3d program of choice, now that I've got to grips with the interface, although I mostly use this for 'quick' plotting of data series, eg. gnuplot *Field.gnu; display *Field.png. My .gnu files contain gnuplot 'header' code above the data, which is automatically added when I output my data from my C++ simulation. I can just comment/uncomment lines to switch from contour to surface plot, change output format/name - and I include other files into the .gnu files for 'global' options which can affect all plots, or put them first on the command-line when running gnuplot (if they don't come first automatically when the wildcard file name is expanded!)

[...]
* others?
Are there any other utils that you can suggest that might meet my
requirements? I'm happy to try things out and will post back reviews of
them too when I have a chance.

Well, if you want a GUI program, there's probably little out there for you, although xmgrace probably does what you want if you'll let it ;) OTOH I keep meaning to try matplotlib/pylab, which can have a limited gui as far as I can tell, and which seems to be talked about a lot on the list. I'm also interested in writing a custom front end in it, if I ever find the time :)

** conclusions
The two main things that I can condense out of this are that:

* there is nothing in linux land that even comes close to Origin for
flexible scientific graphing and data management. That's a pity... linux
leads in everything else, but I know very few other people who will put
the sort of time in that I have done in trying to get this to work.

IMO xmgrace is adequate, if not polished, for 2D interactive plotting. For scripted plotting there are plenty of options, but each require learning the ins and outs of that interface - but this can pay off in the long term if you have lots of the same type of plot.

Maybe I will publish my C++ interface to '.gnu' files at some point.

* the X1 Y1 X2 Y2 data format is a problem.... many of these utilities
would work better if I wasn't using that. However, dropping that format
comes at the expense of me having to do a lot more work to split up
files and then import them individually.

As long as you don't have too many columns to remember, then simply adding a comment character at the start of the line (# or possibly something else too) should work in xmgrace, as above.

* generating smooth-curve data is a problem... I'll play around with
spline(1) from the plotutils package and aspline(1) from the spline
package to see if that could be a viable filter. But having to filter
all the data through an external spline program is somewhat suboptimal.
Perhaps there is python module for this that will work with PyX?

xmgrace (at least here) has cubic and akima spline 'interpolation' - it generates new sets separate from the old.

I should point out that I'm using a prerelease of grace6 (in debian sarge), which hasn't been a problem for me for generating plots, but there are potential issues with forwards compatibility of the file format. Its interface is also possibly more origin-like; it has a 'tree' view of data and I find it better than version 5.

(Note that this is not to say that Origin is without faults. Apart from
the idealogical reasons for moving to free software, the EPS export in
Origin6 doesn't clip the data to within the axes which was the final
motivation for me looking elsewhere. Eventually, I found a workaround
by printing to a PS file and then using ps2epsi but that's not a great
solution.)

EPS seems to work fine in xmgrace :)
...can you tell I use it? ;)

One thing I'll mention here, is that I'm currently using albumshaper to import my .png files (from gnuplot) and generate 'albums' of data in html-ised form. This is great for sharing data with people, publishing on the internet (if you protect access appropriately) and it has a useful shortcut key system, meaning I can cycle through the 'photos' in sequence (time sequence in my case!).

Hope you find what you are looking for,

--
Neil



Reply to: