www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mvgraph4d/get.m
function out=get(gr,varargin) %GET Get interface for the graph4d object % Implements get interface for graph4d object % Currently supported properties are: % 'Position' % 'Visible' % 'Currentxfactor' % 'Currentyfactor' % 'Currentzfactor' % 'Data' % 'Factors' % 'Parent' % 'Frame' % 'Callback' % % The following return a handle, allowing you to set handle graphics properties % (NOTE - this could break the object if you're not careful!) % 'axes' % 'surface' % 'xtext' % 'ytext' % 'ztext' % 'xpopup' % 'ypopup' % 'xpopup' % 'colorbaraxes' % 'colorbarimage' % Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. % Bail if we've not been given a graph3d object if ~isa(gr,'mvgraph4d') error(message('mbc:mvgraph4d:InvalidObject')) end ud = gr.DataPointer.info; % loop over varargin 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 'currentzfactor' out = get(gr.zfactor,'Value'); case 'currentcfactor' out = get(gr.cfactor,'Value'); case 'colormap' out = get(gr.colorbar.bar,'FaceVertexCData'); case 'userange' out = get(gr.colorbar.userange,'Value'); if out==0 out = 'off'; elseif out==1 out = 'on'; end case 'factorselection' if ud.factorselection out = 'exclusive'; else out = 'normal'; end case 'limits' out = ud.limits; case 'frame' out = {'off','on'}; out = out{ud.frame+1}; case 'axes' out = gr.axes; case 'surface' out = gr.surf; case 'xtext' out = gr.xtext; case 'ytext' out = gr.ytext; case 'ztext' out = gr.ztext; case 'xpopup' out = gr.xfactor; case 'ypopup' out = gr.yfactor; case 'zpopup' out = gr.zfactor; case 'parent' out = get(gr.panel,'Parent'); case 'colorbaraxes' out = gr.colorbar.axes; case 'colorbarimage' out = gr.colorbar.bar; 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 'callback' ud = gr.DataPointer.info; out = ud.callback; end end