www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mvgraph2d/get.m
function out=get(gr,varargin) %GET Get interface for mvgraph2d object % Implements get interface for graph2d object % Currently supported properties are: % 'Position' % 'Visible' % 'Currentxfactor' % 'Currentyfactor' % 'Data' % 'Factors' % 'Parent' % 'TransparentColor' % 'Callback' % 'Userdata' % 'Frame' % 'Backgroundcolor' % % The following return a handle, allowing you to set handle graphics properties % (NOTE - this could break the object if you're not careful!) % 'axes' % 'line' % 'xtext' % 'ytext' % 'xpopup' % 'ypopup' % 'image' % 'colorbaraxes' % 'colorbarimage' % Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. % Bail if we've not been given a graph2d object if ~isa(gr,'mvgraph2d') error(message('mbc:mvgraph2d:InvalidObject')) end % loop over varargin ud = gr.DataPointer.info; for n=1:(nargin-1) switch lower(varargin{n}) case 'position' out = ud.position; case 'visible' out = get(gr.panel,'Visible'); case {'data','number','value'} out = ud.data; case 'factors' out = ud.factors; case 'currentxfactor' out = get(gr.xfactor,'Value'); case 'currentyfactor' out = get(gr.yfactor,'Value'); case 'colormap' out = get(gr.colorbar.bar,'FaceVertexCData'); case 'limits' out = ud.limits; case 'factorselection' if ud.factorselection==1 out = 'exclusive'; else out = 'normal'; end case 'transparentcolor' out = ud.transcolor; case 'backgroundcolor' out = get(gr.panel,'BackgroundColor'); case 'callback' out = ud.callback; case 'frame' if ud.ShowFrame out = 'on'; else out = 'off'; end case 'userdata' out = ud.userdata; case 'axes' out = gr.axes; case 'line' out = gr.line; case 'xtext' out = gr.xtext; case 'ytext' out = gr.ytext; case 'xpopup' out = gr.xfactor; case 'ypopup' out = gr.yfactor; case 'parent' out = get(gr.panel,'Parent'); case 'image' out = gr.image; case 'colorbaraxes' out = gr.colorbar.axes; case 'colorbarimage' out = gr.colorbar.bar; case 'markersize' out = get(gr.line,'MarkerSize'); case 'hittest' out = get(gr.axes,'HitTest'); case 'datatags' if ud.datatags==0 out = 'none'; elseif ud.datatags==1 out = 'enumerate'; elseif ud.datatags==2 out = 'custom'; end case 'customdatatags' out = ud.customdatatags; case 'uicontextmenu' out = get(gr.panel,'UIContextMenu'); case 'panel' out = gr.panel; end end