Re: contour

Victor Munoz <[email protected]> Tue, 25 Jan 2005 16:27:41 +0900
Newsgroups gmane.comp.gnu.octave.graphics,gmane.comp.gnu.octave.maintainers
Message-ID <[email protected]>
> | >I think it would also be nice if it could embed the contour levels in
> | >the plot lines (I recall that there were plotting packages from the
> | >mid-eighties (or even before) that could do this).  Maybe gnuplot has
> | >this feature now?  I haven't checked.

Regarding this problem, I posted to some of the octave lists an
implementation of contour which is similar to Matlab. It's a C++ program
which takes contour data on a grid (text data file), and outputs (to a
second file) a matrix with the same format as Matlab's contourc function.
It's available at

http://aristoteles.ciencias.uchile.cl/homepage/software/contourl.html,

and it's based on PLPlot's contour code. Then Shai Ayal took it and made 
oct files based on it. For my personal use, I had to make a rather complex
series of scripts to interfase to my C++ code from Octave's prompt (so that
contour(x,y,Z,levels) works as expected), but probably the oct version is
simpler to handle. The important thing is that in this way, 'contour'
yields a 2D graph, as it just has to plot the individual lines in
the contourl output.

It also has the advantage that the contour data is available as a variable,
and you can do things with it, which is more difficult I think if you pass
both the calculation and drawing responsibilities to gnuplot.

Maybe it could help?

Regards,

							Victor