📄 vis_show_gui_tool.m
字号:
som_show_clear('hit',e); som_show_clear('traj',e); som_show_clear('comet',e); else som_show_clear('lab'); som_show_clear('hit'); som_show_clear('traj'); som_show_clear('comet'); end end v = get(u(3),'value'); if v, if ~isempty(e) som_show_clear('comet',e); else som_show_clear('comet'); end end v = get(u(4),'value'); if v, if ~isempty(e), som_show_clear('hit',e); else som_show_clear('hit'); end end v = get(u(5),'value'); if v, if ~isempty(e), som_show_clear('lab',e); else som_show_clear('lab'); end end v = get(u(6),'value'); if v, if ~isempty(e), som_show_clear('traj',e); else som_show_clear('traj'); end end close(thisfig); %%%%%%%%%%%%%%% do_recolorbar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%elseif strcmp(action,'do_recolorbar') args = {}; ud = get(varargin{1},'UserData'); s = get(ud(1),'String'); e = 1:length(handles); if ~isempty(s) if s(1)=='[' | (s(1)>='1' & s(1)<='9') sprintf(s,'[%s]',s); e = eval(s); else e = s; end if vis_valuetype(e,{'1xn','nx1','string'}), if ischar(e) & ~strcmp(e,'all'), errordlg({'Only valid string value' ... 'for subplot indices is ''all''.'}, ... 'Error in SOM_VIS: tools'); return; elseif any(e<1) | any(e>length(handles)), errordlg({'Subplot indices must be in', ... 'range 1...number_of_subplots.'}, ... 'Error in SOM_VIS: tools'); return; end elseif ~isempty(e) errordlg('Invalid subplot indices!','Error in SOM_VIS: tools'); return; end end args = [args {e}]; s = get(ud(3),'String'); tmp = 'auto'; if strcmp(s,'auto') | strcmp(s,'border'), tmp = s; elseif ~isempty(s) tmp = evalin('base',s); end args = [args {tmp}]; v = get(ud(4),'Value'); s = get(ud(4),'String'); args = [args {s{v}}]; s = get(ud(2),'String'); if ~isempty(s) args = [args {evalin('base',s)}]; end thisfig = varargin{1}; % set(0,'CurrentFigure',udata.vis_h); set(0,'currentfigure',child) som_recolorbar(args{:}); close(thisfig); %%%%%%%% label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%elseif strcmp(action,'label') args = {'label'}; ud = get(varargin{1},'UserData'); s = get(ud(2),'String'); if ~isempty(s) args = [args {evalin('base',s)}]; else args = [args {udata.sM}]; end s = get(ud(3),'String'); if ~isempty(s) args = [args {'TextSize' eval(s)}]; end v = get(ud(4),'Value'); if v>1, s = get(ud(4),'UserData'); args = [args {'TextColor' s{v}}]; end s = get(ud(1),'String'); if ~isempty(s) if s(1)=='[' | (s(1)>='1' & s(1)<='9') sprintf(s,'[%s]',s); e = eval(s); else e = s; end if vis_valuetype(e,{'1xn','nx1','string'}), if ischar(e), if ~strcmp(e,'all'), errordlg({'Only valid string value' ... 'for subplot indices is ''all''.'}, ... 'Error in SOM_VIS: tools'); return; else e=1:length(handles); end elseif any(e<1) | any(e>length(handles)), errordlg({'Subplot indices must be in', ... 'range 1...number_of_subplots!'}, ... 'Error in SOM_VIS: tools'); return; end elseif ~isempty(e) errordlg('Invalid subplot indices!','Error in SOM_VIS: tools'); return; end args = [args {'SubPlot' e}]; end thisfig = varargin{1}; % set(0,'CurrentFigure',udata.vis_h); set(0,'currentfigure',child) som_show_add(args{:}); close(thisfig); %%%%%% hit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%elseif strcmp(action,'hit') args = {'hit'}; ud = get(varargin{1},'UserData'); s = get(ud(2),'String'); e = evalin('base',s); [dummy k] = size(e); args = [args {e}]; v = get(ud(10),'Value'); s = get(ud(10),'UserData'); args = [args {'EdgeColor' s{v}}]; % s = get(ud(7),'String'); if ~isempty(s) args = [args {'MarkerSize' eval(s)}]; end if k == 1, v = get(ud(6),'Value'); if v<16, s = get(ud(6),'String'); args = [args {'Marker' s{v}}]; else % errordlg(); return; end v = get(ud(9),'Value'); if v<10, s = get(ud(9),'UserData'); args = [args {'MarkerColor' s{v}}]; else % errordlg(); return; end % v = get(ud(5),'Value'); s = get(ud(5),'String'); args = [args {'Text' s{v}}]; if v>1, % 1='off' v = get(ud(3),'Value'); s = get(ud(3),'UserData'); args = [args {'TextColor' s{v}}]; % s = get(ud(4),'String'); args = [args {'TextSize' eval(s)}]; end else v = get(ud(8),'Value'); s = get(ud(8),'String'); args = [args {'SizeFactor' s{v}}]; % v = get(ud(6),'Value'); s = get(ud(6),'String'); args = [args {'Marker' s{v}}]; % v = get(ud(9),'Value'); s = get(ud(9),'UserData'); args = [args {'MarkerColor' s{v}}]; end s = get(ud(1),'String'); if ~isempty(s) if s(1)=='[' | (s(1)>='1' & s(1)<='9') sprintf(s,'[%s]',s); e = eval(s); else e = s; end if vis_valuetype(e,{'1xn','nx1','string'}), if ischar(e), if ~strcmp(e,'all'), errordlg({'Only valid string value' ... 'for subplot indices is ''all''.'}, ... 'Error in SOM_VIS: tools'); return; else e=1:length(handles); end elseif any(e<1) | any(e>length(handles)), errordlg({'Subplot indices must be in', ... 'range 1...number_of_subplots!'}, ... 'Error in SOM_VIS: tools'); return; end elseif ~isempty(e) errordlg('Invalid subplot indices!','Error in SOM_VIS: tools'); return; end args = [args {'SubPlot' e}]; end thisfig = varargin{1}; % set(0,'CurrentFigure',udata.vis_h); set(0,'currentfigure',child) som_show_add(args{:}); close(thisfig); %%%%%%% traj %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%elseif strcmp(action,'traj') args = {'traj'}; ud = get(varargin{1},'UserData'); s = get(ud(2),'String'); args = [args {evalin('base',s)}]; s = get(ud(4),'String'); if ~isempty(s) args = [args {'TrajWidth' eval(s)}]; end v = get(ud(5),'Value'); if v>1, s = get(ud(5),'String'); args = [args {'WidthFactor' s{v}}]; end v = get(ud(3),'Value'); if v>1, s = get(ud(3),'UserData'); args = [args {'TrajColor' s{v}}]; end v = get(ud(6),'Value'); if v>1, s = get(ud(6),'String'); args = [args {'Marker' s{v}}]; end s = get(ud(7),'String'); if ~isempty(s) args = [args {'MarkerSize' eval(s)}]; end v = get(ud(8),'Value'); if v>1, s = get(ud(8),'String'); args = [args {'SizeFactor' s{v}}]; end v = get(ud(9),'Value'); if v>1, s = get(ud(9),'UserData'); args = [args {'MarkerColor' s{v}}]; end v = get(ud(10),'Value'); if v>1, s = get(ud(10),'UserData'); args = [args {'EdgeColor' s{v}}]; end s = get(ud(1),'String'); if ~isempty(s) if s(1)=='[' | (s(1)>='1' & s(1)<='9') sprintf(s,'[%s]',s); e = eval(s); else e = s; end if vis_valuetype(e,{'1xn','nx1','string'}), if ischar(e), if ~strcmp(e,'all'), errordlg({'Only valid string value' ... 'for subplot indices is ''all''.'}, ... 'Error in SOM_VIS: tools'); return; else e=1:length(handles); end elseif any(e<1) | any(e>length(handles)), errordlg({'Subplot indices must be in', ... 'range 1...number_of_subplots!'}, ... 'Error in SOM_VIS: tools'); return; end elseif ~isempty(e) errordlg('Invalid subplot indices!','Error in SOM_VIS: tools'); return; end args = [args {'SubPlot' e}]; end thisfig = varargin{1}; % set(0,'CurrentFigure',udata.vis_h); set(0,'currentfigure',child) som_show_add(args{:}); close(thisfig); %%%%%%%% comet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%elseif strcmp(action,'comet') args = {'comet'}; ud = get(varargin{1},'UserData'); s = get(ud(2),'String'); args = [args {evalin('base',s)}]; v = get(ud(3),'Value'); if v>1, s = get(ud(3),'String'); args = [args {'Marker' s{v}}]; end s = get(ud(4),'String'); if ~isempty(s) args = [args {'MarkerSize' eval(s)}]; end v = get(ud(5),'Value'); s = get(ud(5),'UserData'); if v==10, args = [args {'MarkerColor' evalin('base',s{10})}]; else args = [args {'MarkerColor' s{v}}]; end v = get(ud(6),'Value'); if v>1, s = get(ud(6),'UserData'); args = [args {'EdgeColor' s{v}}]; end s = get(ud(1),'String'); if ~isempty(s) if s(1)=='[' | (s(1)>='1' & s(1)<='9') sprintf(s,'[%s]',s); e = eval(s); else e = s; end if vis_valuetype(e,{'1xn','nx1','string'}), if ischar(e), if ~strcmp(e,'all'), errordlg({'Only valid string value' ... 'for subplot indices is ''all''.'}, ... 'Error in SOM_VIS: tools'); return; else e=1:length(handles); end elseif any(e<1) | any(e>length(handles)), errordlg({'Subplot indices must be in', ... 'range 1...number_of_subplots!'}, ... 'Error in SOM_VIS: tools'); return; end elseif ~isempty(e) errordlg('Invalid subplot indices!','Error in SOM_VIS: tools'); return; end args = [args {'SubPlot' e}]; end thisfig = varargin{1}; % set(0,'CurrentFigure',udata.vis_h); set(0,'currentfigure',child) som_show_add(args{:}); close(thisfig); %%%%%%%%% select %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%elseif strcmp(action,'select') %% NOTE: input h is not main_gui_handle %% but edit menu handle w = evalin('base','whos'); for (i=1:length(w)) size_frst{i} = mat2str(w(i).size(1)); x(i,1) = 'x'; size_scnd{i} = mat2str(w(i).size(2)); end names = strvcat(w.name); [d
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -