21 May 2008
15 May 2013)
Like subplot, but easier, and WYSIWYG export to file. Also fixes dashed/dotted lines in export.
% this callback is attached by demopanelD
disp('---- ENTER CALLBACK ----')
% all the information is in this structure.
context = data.context
userdata = data.userdata
% the "context" field provides rendering data, particularly
% the "size_in_mm" is the size of the rendering surface (the
% figure window, or an image file) whilst the "rect" is the
% rectangle assigned to this panel. therefore, we can work
% out the rendered (physical) size of this panel (and
% therefore, usually, the object it manages) with the
% following calculation.
size = data.context.size_in_mm .* data.context.rect(3:4)
disp('---- EXIT CALLBACK ----')