[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 25 Jan 2005 01:26:27 -0600
> | >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
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?