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