Re: publication quality graphs

2005-10-24 Thread Chris Walker

[snip overview of Publication quality graphing packages]

Jamie Rollins [EMAIL PROTECTED] writes:

 Thanks for the overview, Stuart.  Very useful.  

Indeed it was. 

I would find this sort of comparison very useful on a web
site. Perhaps it could be put on the wiki?

Chris


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: publication quality graphs

2005-10-14 Thread Arnd Baecker
Hi,

On Fri, 14 Oct 2005, Stuart Prescott wrote:

 Hi again,

 thanks for your responses so far -- some interesting ideas

 I had a play with PyX some more yesterday and piped the data through the
 aspline utility (package: spline) to get an interpolated smooth curve.
 That worked quite nicely for me (using the python pipes object to stream
 in the data). I'm quite liking pyx as a concept, although I'm still not
 convinced that it's a sustainable approach in the long run.

 But I did realise that it's not particularly efficient to be trying to
 do this in python (which I will have to learn to use PyX) instead of
 perl (which I am quite comfortable in). Anyone know of a perl graphing
 module with the power of PyX?

Learning python is not that hard. It takes about
half a day to get (more than) the basics: See e.g.

- for a quick 6 page start - instant python:
  http://www.hetland.org/python/instant-python.php

- More is offered in the python tutorial
  http://docs.python.org/tut/tut.html

And even more links of course on the docs page of python
  http://docs.python.org/tut/tut.html

This one http://www.hackdiary.com/slides/lpw2004/
discusses python for perl programmers, maybe this helps as well.

Personally I even think that you don't have to
go through the above, but just learn while creating the graphics.
PyX (http://pyx.sourceforge.net/)
comes with *many* examples,  see e.g.
 http://pyx.sourceforge.net/examples/graphs/index.html
ranging from simple to very sophisticated.
Especially, when the data are in files, you just have to do

  from pyx import *

  g = graph.graphxy(width=5)
  g.plot(graph.data.file(two_column_data.dat, x=1, y=2))
  g.writeEPSfile(simple)

And that's it ;-).

The quality, accuracy, and the
excellent (La)TeX embedding for the fonts
makes it my number 1 choice for real publication
quality graphs.
(I used to use gnuplot for all my plots,
but converted recently.
For example all the plots in
  http://www.physik.tu-dresden.de/~baecker/pub21.html
were generated with PyX).

Also I should mention that the developers of PyX
are very open to questions/suggestions
(for example I forwarded the evaluation
and they already started to think about the spline
interpolation!).

Let me bring in another one, matplotlib:
  http://matplotlib.sourceforge.net/
See the examples at
  http://matplotlib.sourceforge.net/screenshots.html

It is also based on python and together with
  - ipython http://ipython.scipy.org/
  - Numeric
(soon to be superseeded by scipy core http://numeric.scipy.org/)
  - scipy http://www.scipy.org/
one gets an excellent framework
for scientific computing in python
(quite similar in many respects with matlab).

Best,

Arnd


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: publication quality graphs

2005-10-14 Thread Andreas Letsch
Hi,

 I am a long-time Matlab user that is trying to migrate to Octave but have been
 having some issues with plotting.  Octave by default uses gnuplot, which I 
 think
 produces very satisfactory plots, but with which I have been having quite a 
 bit
 of trouble exporting the plots to useful files.  Octave also has support for
 plplot (which I noticed was not on your list), but I have no experience with 
 it.

I am using plplot and pgplot from perl/pdl which both are working nice,
there is not much difference in the number of possible functions; 
for publications I am using gnuplot since I want to insert my graphs as
tex-files, which can be done from gnuplot very easily. 

 
 Do people have any suggestions for producing nice plots from Octave?  Has 
 anyone
 figured out a good way to print gnuplot plots produced with Octave?  What 
 about
 peoples experience with plplot?  Thanks in advance for any advice.
 

There is the eps-toolkit (debian package is called octave-epstk), which
produces very nice eps-plots from octave, 

Andreas



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: publication quality graphs

2005-10-14 Thread Frederic-Emmanuel PICCA

why not using gnuplot + metapost
You just have to select the metapost terminal and all the text will be 
generated from tex or Latex.


so you can add equation etc..

I have done all my PhD thesis figures with this and the result was 
terrific :)



bye

frédéric


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: publication quality graphs

2005-10-13 Thread Jamie Rollins
Thanks for the overview, Stuart.  Very useful.  However, I am not having any
luck finding many of the packages you mention in etch; xmggrace, qtiplot, and
pyx in particular don't turn up on a cursory search of packages in etch.  Are
they maybe included in packages under different names?

I am a long-time Matlab user that is trying to migrate to Octave but have been
having some issues with plotting.  Octave by default uses gnuplot, which I think
produces very satisfactory plots, but with which I have been having quite a bit
of trouble exporting the plots to useful files.  Octave also has support for
plplot (which I noticed was not on your list), but I have no experience with it.

Do people have any suggestions for producing nice plots from Octave?  Has anyone
figured out a good way to print gnuplot plots produced with Octave?  What about
peoples experience with plplot?  Thanks in advance for any advice.

jamie.


On Thu, Oct 13, 2005 at 01:57:38PM +1000, Stuart Prescott wrote:
 Hi all,
 
 A question that has come up a few times on this list is how people go
 about producing publication quality graphs. I'm revisiting this question
 as I'm yet to find a method that actually works for me. Part of this is
 that I am used to doing things in a particular way (which might have to
 change!) and part of this is shortcomings in various packages that I've
 tried. After a day or so of frustration with any given app, I end up
 going back to Origin (Origin6 under WINE mostly works).
 
 Here, I'd like to describe how I normally plot data and why the various
 apps that I've tried don't work for me (below).
 
 Hopefully, this will incite some discussion and regular users of these
 apps can suggest some add-ons or simple changes to my workflow that will
 turn them from being a pain in the backside to being a useful utility.
 Or perhaps this will encourage someone (me?) to hack at these apps until
 they become more useful to people like me.
 
 All comments welcome!
 
 cheers
 Stuart
 
 
 
 * current workflow using Origin
 I normally have data from a number of different (but related)
 experiments in the one file (perhaps X1 Y1 X2 Y2 or X Y1 Y2 Y3) format
 that has been exported from OOo.calc or excel or perhaps from a data
 analysis program that I have written for the purpose. The files are
 usually tab-delimited and I can just Import ASCII in Origin and all is
 well. It sets the column names to be the headers from the text file. I
 can then create plots with some or all of the data and will frequently
 want to add new data to a plot from another worksheet trivially etc. In
 the end I produce an EPS graphic for use in LaTeX or a PNG graphic for
 MSWord/MSPowerpoint. I like the project paradigm of Origin where data,
 settings and graphs are all together allowing you to add new data to
 plots, plot things in different ways etc. I don't just make the one
 final publication quality graph in an Origin project; rather, I usually
 have several different publication graphs in the one project (and often
 both print and presentation versions of these graphs too) as well as
 other graphs made while I explore the data. I tend not to use Origin for
 data manipulation as it is much more cumbersome than using a proper
 spreadsheet program like excel or OOo calc.
 
 * 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.
 
 * 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.
 
 * qtiplot
 In a file with X1 Y1 X2 Y2 etc where the data streams are different
 lengths, it chokes... all the data is left-aligned in the import (i.e.
 if X1 Y1 has 20 rows but X2 Y2 has 30 rows, X1 Y1 will gain an extra
 10 rows of data at the expense of X2 Y2). It also doesn't permit you to
 define multiple X columns per data sheet or edit an existing plot to
 change which column is to be used for the X or Y data etc (which is
 useful in transferring settings from one plot to another in the absence
 of styles or templates). Finally, the plots don't scale to the size of
 the window (there is no defined page size) so if you make the window
 bigger, then you have to manually increase all the font sizes yourself.
 
 * labplot
 Shares many of the same bugs/problems as qtiplot. But you also can't add
 a new curve to an existing graph unless you read it in from a data file
 directly or it is a mathematical function (i.e. you can't use data
 already in a data sheet). Column headers are also discarded so you'd
 have to go back and relabel all

Re: publication quality graphs

2005-10-13 Thread Teemu Ikonen
On 10/13/05, Jamie Rollins [EMAIL PROTECTED] wrote:
 Thanks for the overview, Stuart.  Very useful.  However, I am not having any
 luck finding many of the packages you mention in etch; xmggrace, qtiplot, and
 pyx in particular don't turn up on a cursory search of packages in etch.  Are
 they maybe included in packages under different names?

xmgrace is in the package called grace.

 Do people have any suggestions for producing nice plots from Octave?  Has 
 anyone
 figured out a good way to print gnuplot plots produced with Octave?  What 
 about
 peoples experience with plplot?  Thanks in advance for any advice.

I've found the only usable solution for publication quality graphs to
be the grace interface from octave-forge. It doesn't do 3D-plots
though.

Teemu



Re: publication quality graphs

2005-10-13 Thread Neil Pilgrim

Jamie Rollins wrote:

Thanks for the overview, Stuart.  Very useful.  However, I am not having any
luck finding many of the packages you mention in etch; xmggrace, qtiplot, and
pyx in particular don't turn up on a cursory search of packages in etch.  Are
they maybe included in packages under different names?


xmgrace is in package 'grace' or 'grace6', the latter being a 
development snapshot of a version 6 prerelease, that I mentioned on 
another thread that I prefer, if I'm not bothered about keeping the data 
around (the file format isn't stabilised yet, afaict).


--
Neil


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: publication quality graphs

2005-10-13 Thread Stuart Prescott
Hi again,

thanks for your responses so far -- some interesting ideas

I had a play with PyX some more yesterday and piped the data through the
aspline utility (package: spline) to get an interpolated smooth curve.
That worked quite nicely for me (using the python pipes object to stream
in the data). I'm quite liking pyx as a concept, although I'm still not
convinced that it's a sustainable approach in the long run.

But I did realise that it's not particularly efficient to be trying to
do this in python (which I will have to learn to use PyX) instead of
perl (which I am quite comfortable in). Anyone know of a perl graphing
module with the power of PyX?


Jamie, I can't help you with octave questions, but I can help with the
others: 

* xmgrace
my typo: s/xmggrace/xmgrace/ sorry.
As already noted, it's in the package grace6 (or grace, diff versions
etc) as it is a rewrite of an older program called xmgr

* qtiplot 
has no debian package available (for free at least). Source is available
from
http://soft.proindependent.com/qtiplot.html
It has a few dependencies, you'll also need to compile qwtplot3d
yourself, the rest are in Debian. 

* pyx 
pyx is a python package so the package is called python-pyx



Finally, Neil Pilgrim wrote:
  * OOo calc
 Maybe this will improve in the upcoming version 2?

If only. Despite many many requests for this feature, it's only just got
a target milestone... OOo3.0 so don't hold your breath.

http://qa.openoffice.org/issues/show_bug.cgi?id=3997


cheers
Stuart


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: publication quality graphs

2005-10-13 Thread Christian Holm Christensen
Hi Stuart,

On Thu, 2005-10-13 at 13:57 +1000, Stuart Prescott wrote:

 * current workflow using Origin
 I normally have data from a number of different (but related)
 experiments in the one file (perhaps X1 Y1 X2 Y2 or X Y1 Y2 Y3) format
 that has been exported from OOo.calc or excel or perhaps from a data
 analysis program that I have written for the purpose. The files are
 usually tab-delimited and I can just Import ASCII in Origin and all is
 well. It sets the column names to be the headers from the text file. I
 can then create plots with some or all of the data and will frequently
 want to add new data to a plot from another worksheet trivially etc. In
 the end I produce an EPS graphic for use in LaTeX or a PNG graphic for
 MSWord/MSPowerpoint. I like the project paradigm of Origin where data,
 settings and graphs are all together allowing you to add new data to
 plots, plot things in different ways etc. I don't just make the one
 final publication quality graph in an Origin project; rather, I usually
 have several different publication graphs in the one project (and often
 both print and presentation versions of these graphs too) as well as
 other graphs made while I explore the data. I tend not to use Origin for
 data manipulation as it is much more cumbersome than using a proper
 spreadsheet program like excel or OOo calc.

So, you're essentially making plots of pairs of data, or the like? 

 * 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.)

My initial suggestion would be this, but I can understand were you're
coming from.  I have students that would sympathise with you on this
one :-)

 * 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.

ROOT :-) OK, I know that this suggestion was a given coming from me.

However, in particle, nuclear, and heavy ion Physics we've been using
PAW (Debian package paw) from CERN for many years now.  It's old,
written in Fortran 66 (yes, not Fortran 77, 90, 95 or any of that modern
stuff - good old Fortran :-), and the interface isn't exactly that easy
to deal with.  

The successor of PAW is ROOT (and much more than that too).  ROOT is
essentially a set of C++ classes for doing various things related to
data analysis, storage, GRID (the buzz-word), and so on.   It's used
extensively to prepare all sorts of plots, ranging from the casual plot
to impress your supervisor to plot that are put in articles and books. 

There's a interpreter interface that's useful for plotting stuff, as
well as some GUI tools.   The scripting language is C++.   So, suppose
you have a datafile like 

# X   Y EX  EY
0.1 0.000815046 0.0127950.028549
0.2 0.00882257  0.0095365   0.0939285
0.3 0.0367130.0481904   0.191606
0.4 0.0596013   0.0191006   0.244134
0.5 0.1761940.0305726   0.419755

then you could plot this in ROOT with the following script 

void
plotit(const char* fname)
{
   ifstream file(fname);
   TGraphErrors* g = new TGraphErrors;
   g-SetMarkerStyle(20);
   int i = 0;
   while (true) {
 char c = file.peek();
 if (c == '#') { 
string s;
getline(file,s);
continue;
 }
 double x, y, ex, ey;
 file  x  y  ex  ey;
 if (file.eof()) break;
 g-SetPoint(i, x, y);
 g-SetPointError(i, ex, ey);
  }
  file.close();
  g-Draw(acp);
}

To plot the data in `data.dat', do 

 root 
Root .x plotit.C(data.dat)

Titles and the like can be changed either in he script, or interactively
via the GUI.  It's also possible to define preset `styles' e.g., a style
for print, a style for presentations, and so on.Histograms are
easily made too, and there's a special storage format called Tree's that
has many automatic features. 

You can get the ROOT packages by adding 

deb http://mirror.phy.bnl.gov/debian-root unstable root 

to your sources.list (see also thread on ROOT in this mailing list). 

 ** 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 

Re: publication quality graphs

2005-10-13 Thread Jordan H. Mantha
Hi all,
   
   I would just like to throw out PGPLOT. According to the 
website, http://www.astro.caltech.edu/~tjp/pgplot/ :

   The PGPLOT Graphics Subroutine Library is a Fortran- or C-callable, 
device-independent graphics package for making simple scientific graphs.

   In my lab some of us use it to make pubilcation quality plots (my 
advisor considers the quality to be superior to gnuplot, for what it's 
worth). We also use it as a part of our data collection (because it is 
Fortran or C library) programs to visualize our experiments in real time 
(no Labview here). Anyway, I don't use it too much unless I need really 
good quality plots because you have to make (and compile) a Fortran 
program to use it. But, I do think it is worth considering. 

-Jordan Mantha


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



publication quality graphs

2005-10-12 Thread Stuart Prescott
Hi all,

A question that has come up a few times on this list is how people go
about producing publication quality graphs. I'm revisiting this question
as I'm yet to find a method that actually works for me. Part of this is
that I am used to doing things in a particular way (which might have to
change!) and part of this is shortcomings in various packages that I've
tried. After a day or so of frustration with any given app, I end up
going back to Origin (Origin6 under WINE mostly works).

Here, I'd like to describe how I normally plot data and why the various
apps that I've tried don't work for me (below).

Hopefully, this will incite some discussion and regular users of these
apps can suggest some add-ons or simple changes to my workflow that will
turn them from being a pain in the backside to being a useful utility.
Or perhaps this will encourage someone (me?) to hack at these apps until
they become more useful to people like me.

All comments welcome!

cheers
Stuart



* current workflow using Origin
I normally have data from a number of different (but related)
experiments in the one file (perhaps X1 Y1 X2 Y2 or X Y1 Y2 Y3) format
that has been exported from OOo.calc or excel or perhaps from a data
analysis program that I have written for the purpose. The files are
usually tab-delimited and I can just Import ASCII in Origin and all is
well. It sets the column names to be the headers from the text file. I
can then create plots with some or all of the data and will frequently
want to add new data to a plot from another worksheet trivially etc. In
the end I produce an EPS graphic for use in LaTeX or a PNG graphic for
MSWord/MSPowerpoint. I like the project paradigm of Origin where data,
settings and graphs are all together allowing you to add new data to
plots, plot things in different ways etc. I don't just make the one
final publication quality graph in an Origin project; rather, I usually
have several different publication graphs in the one project (and often
both print and presentation versions of these graphs too) as well as
other graphs made while I explore the data. I tend not to use Origin for
data manipulation as it is much more cumbersome than using a proper
spreadsheet program like excel or OOo calc.

* 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.

* 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.

* qtiplot
In a file with X1 Y1 X2 Y2 etc where the data streams are different
lengths, it chokes... all the data is left-aligned in the import (i.e.
if X1 Y1 has 20 rows but X2 Y2 has 30 rows, X1 Y1 will gain an extra
10 rows of data at the expense of X2 Y2). It also doesn't permit you to
define multiple X columns per data sheet or edit an existing plot to
change which column is to be used for the X or Y data etc (which is
useful in transferring settings from one plot to another in the absence
of styles or templates). Finally, the plots don't scale to the size of
the window (there is no defined page size) so if you make the window
bigger, then you have to manually increase all the font sizes yourself.

* labplot
Shares many of the same bugs/problems as qtiplot. But you also can't add
a new curve to an existing graph unless you read it in from a data file
directly or it is a mathematical function (i.e. you can't use data
already in a data sheet). Column headers are also discarded so you'd
have to go back and relabel all the columns. (OK, on the 1 week time
scale you can just remember them, but on the 1 year timescale you need
them labelled, and I always assume that i'm going to have to come back
to it on that timescale as it can be that long between doing the work
and publishing it.) It also can't generate smooth curves (e.g. splines)
between data points.

* 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.

* 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.)

*gri
Works great for me for quick

Re: publication quality graphs

2005-10-12 Thread Victor Munoz
On Thu, Oct 13, 2005 at 01:57:38PM +1000, Stuart Prescott wrote:
 Hi all,
 
 A question that has come up a few times on this list is how people go
 about producing publication quality graphs. I'm revisiting this question
 as I'm yet to find a method that actually works for me. Part of this is
 that I am used to doing things in a particular way (which might have to
 change!) and part of this is shortcomings in various packages that I've
 tried. After a day or so of frustration with any given app, I end up
 going back to Origin (Origin6 under WINE mostly works).
 
 Here, I'd like to describe how I normally plot data and why the various
 apps that I've tried don't work for me (below).
 

I've also had tried several alternatives trying to find the 'right' tool. In
my Windows days I used Matlab, but never used it for the final publication
graph. I rather took the data and imported the data into Axum, whose graphs
looked much better to me. I tried Origin, but never really liked it. Too
graphical for my tastes :-) And for me, contrary to you, this project
concept has always confused me. For me the problem is: raw data - eps graph.

Currently I don't do 3d graphs, so xmgrace is just fine for me, and has the
kind of configurability I need. But I don't like to repeat settings, so what
I did is to write a C++ code which takes the data and outputs a file in the
format .agr used by grace. Then I use the gracebat command to convert to
eps. Actually, the C++ code takes as input a script file, reading data and
graphic settings, and all the work is called from a single command line. I
feel I am doing the same as Gri in a way, but, like you, I tried it and
loved the idea, but the graphs are not quite what I want, and couldn't
configure the bits I needed. :-(


Regards,

Victor



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: publication quality graphs

2005-10-12 Thread Don Armstrong
On Thu, 13 Oct 2005, Stuart Prescott wrote:
 A question that has come up a few times on this list is how people
 go about producing publication quality graphs. I'm revisiting this
 question as I'm yet to find a method that actually works for me.

I personally use R here for almost all of the publication quality
graphs that I need to make here.

My basic workflow looks like the following:

1) data entry into gnumeric
2) export to tab delineated files
3) tweak .R file so that it does what I want it to do for this
   particular dataset [I've got a set of these that I use for
   different experiments/graph types that I use often.]

4) R --no-save  foo.R; to run the R file
5) ps2pdf if I need to send it to people who don't have gv

[I actually have makefiles to do 45]

Of course, R is probably a bit more difficult to get started in, but
the power of the language makes it quite useful to me, despite its
steep learning curve.

http://rzlab.ucr.edu/debian/debian-science/

should give you sort of an idea of what I'm doing. [Ignore the
gigantic +/-, that was a less than stellar experiment.]


Don Armstrong

-- 
I never until now realized that the primary job of any emoticon is to
say excuse me, that didn't make any sense. ;-P
 -- Cory Doctorow

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]