Changeset 295 for trunk/src/write_plot_param.m
- Timestamp:
- Nov 21, 2011, 5:54:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/write_plot_param.m
r292 r295 1 1 %'write_plot_param': update the plotting parameters on the uvmat interface after a plotting operation 2 2 function write_plot_param(handles,PlotParam) 3 %coordinates 4 if isfield(PlotParam,'FixEqual') 5 if PlotParam.FixEqual 6 set(handles.CheckFixEqual,'Value',1) 7 set(handles.CheckFixEqual,'BackgroundColor',[1 1 0]) 3 %% coordinates 4 if isfield(PlotParam,'Coordinates') 5 Coordinates=PlotParam.Coordinates; 6 if isfield(Coordinates,'CheckFixEqual') 7 if Coordinates.CheckFixEqual 8 set(handles.CheckFixEqual,'Value',1) 9 set(handles.CheckFixEqual,'BackgroundColor',[1 1 0]) 10 else 11 set(handles.CheckFixEqual,'Value',0) 12 set(handles.CheckFixEqual,'BackgroundColor',[0.7 0.7 0.7]) 13 end 14 end 15 if isfield(Coordinates,'MinX') 16 set(handles.num_MinX,'String',num2str(Coordinates.MinX,4)); 17 set(handles.num_MaxX,'String',num2str(Coordinates.MaxX,4)); 18 set(handles.num_MinY,'String',num2str(Coordinates.MinY,4)); 19 set(handles.num_MaxY,'String',num2str(Coordinates.MaxY,4)); 8 20 else 9 set(handles.CheckFixEqual,'Value',0) 10 set(handles.CheckFixEqual,'BackgroundColor',[0.7 0.7 0.7]) 21 set(handles.num_MinX,'String',''); 22 set(handles.num_MaxX,'String',''); 23 set(handles.num_MinY,'String',''); 24 set(handles.num_MaxY,'String',''); 11 25 end 12 26 end 13 if isfield(PlotParam,'MinX')14 set(handles.num_MinX,'String',num2str(PlotParam.MinX,4));15 set(handles.num_MaxX,'String',num2str(PlotParam.MaxX,4));16 set(handles.num_MinY,'String',num2str(PlotParam.MinY,4));17 set(handles.num_MaxY,'String',num2str(PlotParam.MaxY,4));18 else19 set(handles.num_MinX,'String','');20 set(handles.num_MaxX,'String','');21 set(handles.num_MinY,'String','');22 set(handles.num_MaxY,'String','');23 end24 27 25 % scalar or image parameters28 %% scalar or image parameters 26 29 if isfield(PlotParam,'Scalar') 27 set _scal_display(handles,'on')30 set(handles.Scalar,'Visible','on') 28 31 if isfield(PlotParam.Scalar,'MaxA') 29 32 set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3)); … … 32 35 set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3)); 33 36 end 34 37 35 38 if isfield(PlotParam.Scalar,'IncrA') 36 39 set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3)) 37 40 end 38 41 else 39 set _scal_display(handles,'off')42 set(handles.Scalar,'Visible','off') 40 43 end 41 44 42 % parameter for vector field45 %% parameter for vector field 43 46 if isfield(PlotParam,'Vectors') 44 set _vect_display(handles,'on')47 set(handles.Vectors,'Visible','on') 45 48 if isfield(PlotParam.Vectors,'VecScale') 46 49 set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3)) … … 53 56 list=get(handles.color_code,'String'); 54 57 ichoice=get(handles.color_code,'Value'); 55 58 color_option=list{ichoice}; 56 59 test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr'); 57 60 if test3color% need to update color thresholds … … 60 63 set(handles.slider1,'Visible','on') 61 64 set(handles.slider2,'Visible','on') 62 % slider1=get(handles.slider1,'Value'); 63 % slider2=get(handles.slider2,'Value'); 64 colcode1=MinC+(MaxC-MinC)*PlotParam.Vectors.colcode1; 65 colcode2=MinC+(MaxC-MinC)*PlotParam.Vectors.colcode2; 65 colcode1=MinC+(MaxC-MinC)*PlotParam.Vectors.colcode1; 66 colcode2=MinC+(MaxC-MinC)*PlotParam.Vectors.colcode2; 66 67 set(handles.colcode1,'String',num2str(colcode1,3)) 67 68 set(handles.colcode2,'String',num2str(colcode2,3)) … … 76 77 end 77 78 else 78 set _vect_display(handles,'off')79 set(handles.Vectors,'Visible','off') 79 80 if isfield(handles,'edit_vect') 80 81 set(handles.edit_vect,'Visible','off') … … 82 83 end 83 84 end 84 85 %------------------------------------------------------------------86 %prepare interface for scalar display: state ='on' or 'off'87 function set_scal_display(handles,state)88 %------------------------------------------------------------------89 set(handles.Scalar,'Visible',state)90 % set(handles.num_MaxA,'Visible',state)91 % set(handles.num_MinA,'Visible',state)92 % %set(handles.IncrA,'Visible',state)93 % set(handles.CheckFixScalar,'Visible',state)94 % set(handles.CheckBW,'Visible',state)95 % set(handles.ListContour,'Visible',state)96 % set(handles.TitleMinA,'Visible',state)97 % set(handles.TitleMaxA,'Visible',state)98 % set(handles.num_Npx,'Visible',state)99 % set(handles.num_Npy,'Visible',state)100 % set(handles.TitleNpx,'Visible',state)101 % set(handles.TitleNpy,'Visible',state)102 103 %---------------------------------------------104 %prepare interface for vector display: state ='on' or 'off'105 function set_vect_display(handles,state)106 %------------------------------------------------------------------107 set(handles.Vectors,'Visible',state)108 % set(handles.VECT_title,'Visible',state)109 % set(handles.num_VecScale,'Visible',state)110 % set(handles.FixVec,'Visible',state)111 % set(handles.HideFalse,'Visible',state)112 % set(handles.HideWarning,'Visible',state)113 % % if isfield(handles,'record')114 % % set(handles.record,'Visible',state)115 % % end116 % set(handles.num_ColCode1,'Visible',state)117 % set(handles.num_ColCode2,'Visible',state)118 % set(handles.num_MinVec,'Visible',state)119 % set(handles.num_MaxVec,'Visible',state)120 % set(handles.scale_title,'Visible',state)121 % set(handles.slider1,'Visible',state)122 % set(handles.slider2,'Visible',state)123 % set(handles.col_vec,'Visible',state)124 % set(handles.Color_title,'Visible',state)125 % set(handles.color_code,'Visible',state)126 % set(handles.vec_col_bar,'Visible',state)127 % % set(handles.record,'Visible',state)128 % set(handles.AutoVecColor,'Visible',state)129 % set(handles.decimate4,'Visible',state)130 % set(handles.min_C_title,'Visible',state)131 % set(handles.max_C_title,'Visible',state)132 % if isfield(handles,'MenuEditVectors')133 % set(handles.MenuEditVectors,'Enable',state)134 % end
Note: See TracChangeset
for help on using the changeset viewer.