help-octave
[Top][All Lists]
Advanced

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

Re: Contour plots


From: Shai Ayal
Subject: Re: Contour plots
Date: Tue, 08 Mar 2005 14:36:10 +0200
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Paul,

it's the first time I hear of the ishold function. I also like your trick to get rid of the keys. Thanks

Shai

Paul Kienzle wrote:
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




--
Shai Ayal, Ph.D.
Head of Research
BioControl Medical BCM
3 Geron St.
Yehud 56100
ISRAEL
Tel:  + 972 3 6322 126
Fax:  + 972 3 6322 125
email: address@hidden



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