Functions | |
if ((ischar(arg)||iscell(arg)))[linespec | |
if (isempty(linespec.color)) linespec.color | |
endif | if (valid) have_line_spec |
varargin (i) | |
while (i< length(varargin)) if(ischar(varargin | |
if (strcmpi(varargin{i},"fill")) filled | |
varargin (i:i+1) | |
elseif (strcmpi(varargin{i},"linecolor")) linespec.color | |
if (ischar(edgecolor)&&strcmpi(edgecolor,"auto")) edgecolor | |
elseif (strcmpi(varargin{i},"edgecolor")) linespec.color | |
if (ischar(edgecolor)&&strcmpi(edgecolor,"flat")) linespec.color | |
endif endwhile | if (length(varargin)< 5) z1 |
endif | if (length(varargin)==4||length(varargin)==6) vn |
endif | if (isscalar(vn)) lvl |
endif | if (strcmpi(filled,"on")) if(isvector(x1)||isvector(y1))[x1 |
x0 (1,:)] | |
z0 (2:nr+1, 2:nc+1) | |
addproperty ("xdata", hg,"data", x1) | |
addproperty ("ydata", hg,"data", y1) | |
addproperty ("zdata", hg,"data", z1) | |
addproperty ("contourmatrix", hg,"data", c) | |
addlistener (hg,"xdata",@update_data) | |
addlistener (hg,"ydata",@update_data) | |
addlistener (hg,"zdata",@update_data) | |
addlistener (hg,"contourmatrix",@update_data) | |
addproperty ("fill", hg,"radio","on|{off}", filled) | |
if (isnumeric(zlevel)) addproperty("zlevelmode" | |
Variables | |
function [c, hg] | |
zlevel = varargin{2} | |
filled = "off" | |
linespec | linestyle = "-" |
linespec | color = "auto" |
edgecolor = "flat" | |
for | i |
valid = __pltopt__ ("__contour__", arg, false) | |
break | |
endif endif endfor | opts = {} |
x1 = 1 : rows(z1) | |
y1 = 1 : columns(z1) | |
z1 = varargin{5} | |
vnauto = false | |
vn = 10 | |
else | lvl = vn |
endif [nr, nc] = size (z1) | |
x0 = prepad(x1, nc+1, 2 * x1(1, 1) - x1(1, 2), 2) | |
y0 = prepad(y1, nr+1, 2 * y1(1, 1) - y1(2, 1), 1) | |
z0 = -Inf(nr+2, nc+2) | |
else [c, lev] = contourc (x0, y0, z0, lvl) contourc (x1, y1, z1, lvl) | |
endif | hg = hggroup () |
radio |
addlistener | ( | hg | , | |
"contourmatrix" | , | |||
@ | update_data | |||
) |
addlistener | ( | hg | , | |
"zdata" | , | |||
@ | update_data | |||
) |
addlistener | ( | hg | , | |
"ydata" | , | |||
@ | update_data | |||
) |
addlistener | ( | hg | , | |
"xdata" | , | |||
@ | update_data | |||
) |
addproperty | ( | "fill" | , | |
hg | , | |||
"radio" | ||||
) |
addproperty | ( | "contourmatrix" | , | |
hg | , | |||
"data" | , | |||
c | ||||
) |
addproperty | ( | "xdata" | , | |
hg | , | |||
"data" | , | |||
x1 | ||||
) |
elseif | ( | strcmpi(varargin{i},"edgecolor") | ) |
elseif | ( | strcmpi(varargin{i},"linecolor") | ) |
if | ( | isnumeric(zlevel) | ) |
endif if | ( | length(varargin) | = =4||length(varargin)==6 |
) |
if | ( | strcmpi(varargin{i},"fill") | ) |
if | ( | isempty(linespec.color) | ) |
if | ( | (ischar(arg)||iscell(arg)) | ) |
varargin | ( | i:i+ | 1 | ) |
varargin | ( | i | ) |
while | ( | ) | [new] |
x0 | ( | 1 | , | |
: | ||||
) |
break |
edgecolor = "flat" |
filled = "off" |
opts = {} |
valid = __pltopt__ ("__contour__", arg, false) |
vn = 10 |
z1 = varargin{5} |
zlevel = varargin{2} |