octave-maintainers
[Top][All Lists]
Advanced

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

Re: contour plots and doing graphics in octave


From: Paul Kienzle
Subject: Re: contour plots and doing graphics in octave
Date: Sat, 31 Jan 2004 07:38:25 -0500


On Jan 28, 2004, at 10:18 PM, Donald J Bindner wrote:

On Wed, Jan 28, 2004 at 09:51:03PM -0500, Paul Kienzle wrote:
Ideally you should create a routine which returns the lines you
want to draw, and leave it to another routine to do the
plotting.  That allows flexibility in choosing a plotting
package.

If you need to do the plotting from C++, I would
recommend using feval to call the usual plot scripts
rather trying to tie directly into the stream.  Something like:

  #include <octave/parse.h>
  ...
  octave_value_list in;
  in(2) = "x;my line;";
  in(1) = Y;
  in(0) = X;
  feval("plot",in,0); // nargout==0

I can think about that.  It adds substantial complication to
"follow" the contour lines around the grid, and there's no
guarantee that contour lines have to be simple, connected,
non-self-intersecting curves with an obvious starting and ending
point.  The beauty of my current method is that it doesn't
require a traversal method; you just look at each rectangle of
the grid and draw the parts of contour lines that itersect that
rectangle.

yes, I did a similar hack directly on images (see contourf).

The epstk package has eisoline to calculate contours but
I haven't looked at the code.

I don't think I could pass 5000 separate line segments to the
plot routine very effectively.  Writing the data in gnuplot
format does tie the routine to that program, but not really more
than the current contour.m in Octave.  So it's not really ideal,
but it isn't really a step backward either.

I was hoping you could draw disconnected lines in gnuplot
by separating the parts with NaN, but it didn't work for me.

Paul Kienzle
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]