Functions | |
addproperty ("xdata", hg,"data", x1) | |
addproperty ("ydata", hg,"data", y1) | |
addlistener (hg,"xdata",@update_data) | |
addlistener (hg,"ydata",@update_data) | |
if (i==1) h | |
addproperty ("basevalue", hg,"data", bv) | |
addlistener (hg,"basevalue",@move_baseline) | |
addproperty ("edgecolor", hg,"patchedgecolor", get(h,"edgecolor")) | |
addproperty ("linewidth", hg,"patchlinewidth", get(h,"linewidth")) | |
addproperty ("linestyle", hg,"patchlinestyle", get(h,"linestyle")) | |
addproperty ("facecolor", hg,"patchfacecolor", get(h,"facecolor")) | |
addlistener (hg,"edgecolor",@update_props) | |
addlistener (hg,"linewidth",@update_props) | |
addlistener (hg,"linestyle",@update_props) | |
addlistener (hg,"facecolor",@update_props) | |
addproperty ("areagroup", hg,"data") | |
set (retval,"areagroup", retval) | |
if (!isempty(args)) set(hg | |
endif endfor endfunction function | update_props (h, d) kids |
set (kids,"edgecolor", get(h,"edgecolor"),"linewidth", get(h,"linewidth"),"linestyle", get(h,"linestyle"),"facecolor", get(h,"facecolor")) | |
endfunction function | move_baseline (h, d) persistent recursion |
if (!recursion) unwind_protect recursion | |
if (b1!=b0) set(hh | |
endif endif endfor | update_data (h, d) = get (h, "areagroup") |
set (get(hh,"children"),"xdata",[x1(1);x1;flipud(x1)]) | |
set (get(hh,"children"),"ydata",[y0(1);y1;flipud(y0)]) | |
Variables | |
function | retval |
y0 = zeros (1, rows (y)) | |
for | i = 1: size (y, 2) |
hg = hggroup () | |
args = __add_datasource__ ("area", hg, {"x", "y"}, varargin{:}) | |
x1 = x(:, 1).' | |
y1 = y (:, i).' | |
h | |
hlist = get (h, "areagroup") | |
b0 = get (h, "basevalue") | |
for | hh |
basevalue | |
unwind_protect_cleanup | recursion = false |
bv = get (h, "basevalue") | |
children | |
ydata |
addlistener | ( | hg | , | |
"facecolor" | , | |||
@ | update_props | |||
) |
addlistener | ( | hg | , | |
"linestyle" | , | |||
@ | update_props | |||
) |
addlistener | ( | hg | , | |
"linewidth" | , | |||
@ | update_props | |||
) |
addlistener | ( | hg | , | |
"edgecolor" | , | |||
@ | update_props | |||
) |
addlistener | ( | hg | , | |
"basevalue" | , | |||
@ | move_baseline | |||
) |
addlistener | ( | hg | , | |
"ydata" | , | |||
@ | update_data | |||
) |
addlistener | ( | hg | , | |
"xdata" | , | |||
@ | update_data | |||
) |
addproperty | ( | "areagroup" | , | |
hg | , | |||
"data" | ||||
) |
addproperty | ( | "facecolor" | , | |
hg | , | |||
"patchfacecolor" | , | |||
get(h,"facecolor") | ||||
) |
addproperty | ( | "linestyle" | , | |
hg | , | |||
"patchlinestyle" | , | |||
get(h,"linestyle") | ||||
) |
addproperty | ( | "linewidth" | , | |
hg | , | |||
"patchlinewidth" | , | |||
get(h,"linewidth") | ||||
) |
addproperty | ( | "edgecolor" | , | |
hg | , | |||
"patchedgecolor" | , | |||
get(h,"edgecolor") | ||||
) |
addproperty | ( | "xdata" | , | |
hg | , | |||
"data" | , | |||
x1 | ||||
) |
if | ( | b1! | = b0 |
) |
if | ( | ! | recursion | ) |
if | ( | ! | isemptyargs | ) |
if | ( | i | = = 1 |
) |
endfunction function move_baseline | ( | h | , | |
d | ||||
) |
set | ( | get(hh,"children") | , | |
"ydata" | ||||
) |
set | ( | get(hh,"children") | , | |
"xdata" | ||||
) |
set | ( | kids | , | |
"edgecolor" | , | |||
get(h,"edgecolor") | , | |||
"linewidth" | , | |||
get(h,"linewidth") | , | |||
"linestyle" | , | |||
get(h,"linestyle") | , | |||
"facecolor" | , | |||
get(h,"facecolor") | ||||
) |
set | ( | retval | , | |
"areagroup" | , | |||
retval | ||||
) |
end_unwind_protect endif endfunction function update_data | ( | h | , | |
d | ||||
) | = get (h, "areagroup") |
endif endfor endfunction function update_props | ( | h | , | |
d | ||||
) |
args = __add_datasource__ ("area", hg, {"x", "y"}, varargin{:}) |
b0 = get (h, "basevalue") |
bv = get (h, "basevalue") |
h |
hlist = get (h, "areagroup") |
for i = 1: size (y, 2) |
unwind_protect_cleanup recursion = false |
x1 = x(:, 1).' |