?? som_show_gui.m
字號(hào):
tw = 0.21;iw = 0.28;unit_edges_text_pos = [ue (tmp+dd) tw th];unit_edges_pos = [ie1 tmp iw ph]; tmp = unit_edges_pos(2)-(d+ph) - d;unit_sizes_text_pos = [ue (tmp+dd) tw th];unit_sizes_pos = [ie1 tmp iw ph]; tmp = unit_sizes_pos(2)-(d+ph) - d;colorbar_dir_text_pos = [ue (tmp+dd) tw th];colorbar_dir_pos = [ie1 tmp iw ph]; tmp2 = sum(colorbar_dir_pos([1 3]));colorbar_norm_text_pos = [(tmp2) (tmp+dd) 0.11 th];colorbar_norm_pos = [(1-ue-(iw+0.06)) tmp (iw+0.06) ph]; tmp = colorbar_norm_pos(2)-(d+ph) - d;colormap_text_pos = [ue (tmp+dd) tw th];colormap_pos = [ie1 tmp iw ph]; tmp = colormap_pos(2)-(d+ph) - d;footnote_text_pos = [ue (tmp+dd) tw th]; footnote_pos = [ie1 tmp (1-ue-ie1) ph];tmp = planes_listbox_pos(2)-big_frame_pos(2);tmp2 = ah+2*tmp;little_frame_pos = [ue tmp (1-2*ue) tmp2]; tmp2 = little_frame_pos(2)+tmp;ddd = 0.1;bw = (little_frame_pos(3)-2*0.03-ddd)/2;visualize_pos = [(ue+0.03) tmp2 bw ah];close_pos = [(sum(visualize_pos([1 3]))+ddd) tmp2 bw ah];%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% main figure%fig_h = figure( ... 'Units','normalized', ... 'Color',fig_color, ... 'PaperPosition',[18 180 576 432], ... 'PaperType','A4', ... 'PaperUnits','normalized', ... 'Position',[fig_i fig_s], ... 'ToolBar','none', ... 'NumberTitle','off', ... 'Name',FIGURENAME, ... 'Visible','off');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% hint text%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',fig_color, ... 'HorizontalAlignment','left', ... 'Position',hint_text_pos, ... 'String','Add planes and then visualize', ... 'Style','text');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% planes listbox%uicontrol( ... 'Units','normalized', ... 'Position',big_frame_pos, ... 'Style','frame');uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color1, ... 'HorizontalAlignment','left', ... 'Position',planes_listbox_text_pos, ... 'String','Planes', ... 'Style','text');list1_h = uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color2, ... 'Position',planes_listbox_pos, ... 'String',{plot_array(:).string}, ... 'Style','listbox', ... 'Max',2, ... 'Value',1);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% edit subplots%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color1, ... 'HorizontalAlignment','center', ... 'Position',subplots_text_pos, ... 'String','subplots', ... 'Style','text');edit4_h = uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color2, ... 'Position',subplots_pos, ... 'FontSize',14, ... 'String','', ... 'Style','edit');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Add components'%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color1, ... 'HorizontalAlignment','left', ... 'Position',add_components_pos, ... 'String',' Add components', ... 'Callback',['som_show_gui(''add_selected_comp'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Add all components'%uicontrol( ... 'Units','normalized', ... 'HorizontalAlignment','left', ... 'Position',add_all_components_pos, ... 'String',' Add all components', ... 'Callback',['som_show_gui(''add_all_comps'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Add U-matrix'%uicontrol( ... 'Units','normalized', ... 'HorizontalAlignment','left', ... 'Position',add_u_matrix_pos, ... 'String',' Add U-matrix', ... 'Callback',['som_show_gui(''add_u_matrix'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Add colorplane'%uicontrol( ... 'Units','normalized', ... 'HorizontalAlignment','left', ... 'Position',add_colorplane_pos, ... 'String',' Add colorplane', ... 'Callback',['som_show_gui(''add_colorplane'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Add empty'%uicontrol( ... 'Units','normalized', ... 'HorizontalAlignment','left', ... 'Position',add_empty_pos, ... 'String',' Add empty', ... 'Callback',['som_show_gui(''add_empty'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Remove'%uicontrol( ... 'Units','normalized', ... 'HorizontalAlignment','left', ... 'Position',remove_pos, ... 'String',' Remove', ... 'Callback',['som_show_gui(''remove'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% creat pushbutton 'Remove all'%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color1, ... 'HorizontalAlignment','left', ... 'Position',remove_all_pos, ... 'String',' Remove all', ... 'Callback',['som_show_gui(''remove_all'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Plane options'%uicontrol( ... 'Units','normalized', ... 'Position',plane_options_pos, ... 'String',' Plane options', ... 'Callback',['som_show_gui(''more_options'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% popupmenu unitedges%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',fig_color, ... 'HorizontalAlignment','left', ... 'Position',unit_edges_text_pos, ... 'String','unit edges are', ... 'Style','text');popup1_h = uicontrol( ... 'Units','normalized', ... 'Max',2, ... 'Min',1, ... 'Position',unit_edges_pos, ... 'UserData',{'off' 'on'}, ... 'String',{'off' 'on'}, ... 'Style','popupmenu', ... 'Value',1);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% unit sizes edit%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',fig_color, ... 'HorizontalAlignment','left', ... 'Position',unit_sizes_text_pos, ... 'String','unit sizes', ... 'Style','text');edit1_h = uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color2, ... 'Position',unit_sizes_pos, ... 'FontSize',12, ... 'String','1', ... 'Style','edit');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% popupmenu colorbardir%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',fig_color, ... 'HorizontalAlignment','left', ... 'Position',colorbar_dir_text_pos, ... 'String','colorbar is', ... 'Style','text');popup2_h = uicontrol( ... 'Units','normalized', ... 'Max',3, ... 'Min',1, ... 'Position',colorbar_dir_pos, ... 'UserData', {'vert' 'horiz' 'none'}, ... 'String','vert| horiz| none', ... 'Style','popupmenu', ... 'Value',1);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% popupmenu colorbarnorm%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',fig_color, ... 'HorizontalAlignment','left', ... 'Position',colorbar_norm_text_pos, ... 'String',' and ', ... 'Style','text');popup3_h = uicontrol( ... 'Units','normalized', ... 'Max',2, ... 'Min',1, ... 'Position',colorbar_norm_pos, ... 'UserData', {'d' 'n'}, ... 'String',{'denormalized','normalized'}, ... 'Style','popupmenu', ... 'Value',1);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% colormap edittext%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',fig_color, ... 'HorizontalAlignment','left', ... 'Position',colormap_text_pos, ... 'String','colormap', ... 'Style','text');edit2_h = uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color2, ... 'Position',colormap_pos, ... 'FontSize',12, ... 'String','', ... 'Style','edit');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% footnote edittext%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',fig_color, ... 'HorizontalAlignment','left', ... 'Position',footnote_text_pos, ... 'String','footnote', ... 'Style','text');edit3_h = uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color2, ... 'Position',footnote_pos, ... 'FontSize',12, ... 'String',sM.name, ... 'Style','edit');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Visualize'%uicontrol( ... 'Units','normalized', ... 'Position',little_frame_pos, ... 'Style','frame');uicontrol( ... 'Units','normalized', ... 'Position',visualize_pos, ... 'String','Visualize', ... 'Callback',['som_show_gui(''visualize'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pushbutton 'Close'%uicontrol( ... 'Units','normalized', ... 'BackgroundColor',bg_color1, ... 'Position',close_pos, ... 'String','Close', ... 'Callback',['som_show_gui(''close'',' mat2str(gcf) ')']);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% menus%uimenu('Parent',fig_h','Label',' ','Enable','off');m = uimenu('Parent',fig_h,'Label','Tools'); a = uimenu('Parent',m,'Label','Add'); s = strcat('vis_show_gui_tool(',mat2str(gcf),',''add_label'')'); uimenu('Parent',a,'Label','label','Callback',s); s = strcat('vis_show_gui_tool(',mat2str(gcf),',''add_hit'')'); uimenu('Parent',a,'Label','hit','Callback',s); s = strcat('vis_show_gui_tool(',mat2str(gcf),',''add_traj'')'); uimenu('Parent',a,'Label','traj','Callback',s); s = strcat('vis_show_gui_tool(',mat2str(gcf),',''add_comet'')'); uimenu('Parent',a,'Label','comet','Callback',s); s = ['vis_show_gui_tool(',mat2str(gcf),',''clear'')']; c = uimenu('Parent',m,'Label','Clear','Separator','on','callback',s); s = strcat('vis_show_gui_tool(',mat2str(gcf),',''recolorbar'')'); r = uimenu('Parent',m,'Label','Recolorbar','Separator','on', ... 'Callback',s);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end%ud.sM = sM;ud.plot_array = plot_array;ud.property = {};ud.vis_h = [];ud.h = [list1_h popup1_h popup2_h popup3_h ... edit1_h edit2_h edit3_h edit4_h];watchoff(oldFigNumber);set(fig_h,'Visible','on', ... 'UserData', ud, ... 'handlevisibility','off');
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -