help-octave
[Top][All Lists]
Advanced

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

Re: Contour plots


From: Paul Kienzle
Subject: Re: Contour plots
Date: Tue, 8 Mar 2005 06:04:02 -0500

Shai,

Here's how I hacked your contour.m to work with gnuplot.  Providing
gca, cla and line for gnuplot would be a better solution, but this
was good enough to show that contourc works:

function ret = contour(varargin)

  c = contourc(varargin{:});

if 0
  ca = gca();
  if (isempty(ca))
    cla();
  elseif (strcmp(get(ca,"nextplot"),"replace")),
    cla();
  endif
endif

  ## decode contourc output format
  held = ishold;
  i1 = 1;
  while(i1<length(c))
    ii = i1+1:i1+c(2,i1);
    plot(c(1,ii),c(2,ii),';;'); hold on;

    i1 += c(2,i1)+1;
  endwhile
  if ~held, hold off; end

  if nargout > 0, ret = c; end

endfunction

On Mar 8, 2005, at 2:35 AM, Shai Ayal wrote:

Henry,

the file I was refering to is compatible with gnuplot. It was posted at 5 March 2005 to the maintainers list. It also has some explanations about the files. The files you are refering to are similar except for contour.m which uses the "line" command to plot lines -- this is not available on gnuplot -- just change it to "plot". Also in the new files contourl.cc has been renamed __contourc__.cc

I would be happy to get more feedback on them
Shai



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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