Home > . > write_plot_param.m

write_plot_param

PURPOSE ^

'write_plot_param': update the plotting parameters on the uvmat interface after a plotting operation

SYNOPSIS ^

function write_plot_param(handles,PlotParam)

DESCRIPTION ^

'write_plot_param': update the plotting parameters on the uvmat interface after a plotting operation

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 %'write_plot_param': update the plotting parameters on the uvmat interface after a plotting operation
0002 function write_plot_param(handles,PlotParam)
0003 
0004 %scalar or image parameters
0005 if isfield(PlotParam,'Scalar')
0006     set_scal_display(handles,'on')
0007     if isfield(PlotParam.Scalar,'MaxA')
0008         set(handles.MaxA,'String',num2str(PlotParam.Scalar.MaxA,3));
0009     end
0010     if isfield(PlotParam.Scalar,'MinA')
0011         set(handles.MinA,'String',num2str(PlotParam.Scalar.MinA,3));
0012     end
0013 
0014     if isfield(PlotParam.Scalar,'IncrA')
0015         set(handles.IncrA,'String',num2str(PlotParam.Scalar.IncrA,3))
0016     end
0017 else
0018     set_scal_display(handles,'off')
0019 end
0020 
0021 % parameter for vector field
0022 if isfield(PlotParam,'Vectors')
0023     set_vect_display(handles,'on')
0024     if isfield(PlotParam.Vectors,'VecScale')
0025         set(handles.VecScale,'String',num2str(PlotParam.Vectors.VecScale,3))
0026     end
0027     if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC')
0028         MinC=PlotParam.Vectors.MinC;
0029         MaxC=PlotParam.Vectors.MaxC;
0030         set(handles.min_vec,'String', num2str(MinC,3));
0031         set(handles.max_vec,'String',num2str(MaxC,3));
0032         list=get(handles.color_code,'String');
0033         ichoice=get(handles.color_code,'Value');
0034         color_option=list{ichoice};
0035         test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr');
0036         if test3color% need to update color thresholds
0037             set(handles.colcode1,'Visible','on')
0038             set(handles.colcode2,'Visible','on')
0039             set(handles.slider1,'Visible','on')
0040             set(handles.slider2,'Visible','on')
0041 %             slider1=get(handles.slider1,'Value');
0042 %             slider2=get(handles.slider2,'Value');
0043              colcode1=MinC+(MaxC-MinC)*PlotParam.Vectors.colcode1;
0044              colcode2=MinC+(MaxC-MinC)*PlotParam.Vectors.colcode2;
0045             set(handles.colcode1,'String',num2str(colcode1,3))
0046             set(handles.colcode2,'String',num2str(colcode2,3))
0047             set(handles.slider1,'Value',PlotParam.Vectors.colcode1)
0048             set(handles.slider2,'Value',PlotParam.Vectors.colcode2)
0049         else
0050             set(handles.colcode1,'Visible','off')
0051             set(handles.colcode2,'Visible','off')
0052             set(handles.slider1,'Visible','off')
0053             set(handles.slider2,'Visible','off')
0054         end
0055     end
0056 else
0057     set_vect_display(handles,'off')
0058     set(handles.edit_vect,'Visible','off')
0059 end
0060 
0061 %------------------------------------------------------------------
0062 %prepare interface for scalar display: state ='on' or 'off'
0063 function set_scal_display(handles,state)
0064 %------------------------------------------------------------------
0065 set(handles.SCALAR_title,'Visible',state)
0066 set(handles.MaxA,'Visible',state)
0067 set(handles.MinA,'Visible',state)
0068 %set(handles.IncrA,'Visible',state)
0069 set(handles.AutoScal,'Visible',state)
0070 set(handles.BW,'Visible',state)
0071 set(handles.Contours,'Visible',state)
0072 set(handles.SCALAR_title,'Visible',state)
0073 set(handles.min_title,'Visible',state)
0074 set(handles.max_title,'Visible',state)
0075 set(handles.frame_scal,'Visible',state)
0076 set(handles.npx,'Visible',state)
0077 set(handles.npy,'Visible',state)
0078 set(handles.npx_title,'Visible',state)
0079 set(handles.npy_title,'Visible',state)
0080 %set(handles.makemask,'Visible',state)
0081 
0082 %---------------------------------------------
0083 %prepare interface for vector display: state ='on' or 'off'
0084 function set_vect_display(handles,state)
0085 %------------------------------------------------------------------
0086 set(handles.frame_vect,'Visible',state)
0087 set(handles.VECT_title,'Visible',state)
0088 set(handles.VecScale,'Visible',state)
0089 set(handles.AutoVec,'Visible',state)
0090 set(handles.HideFalse,'Visible',state)
0091 set(handles.HideWarning,'Visible',state)
0092 set(handles.record,'Visible',state)
0093 set(handles.colcode1,'Visible',state)
0094 set(handles.colcode2,'Visible',state)
0095 set(handles.min_vec,'Visible',state)
0096 set(handles.max_vec,'Visible',state)
0097 set(handles.scale_title,'Visible',state)
0098 set(handles.slider1,'Visible',state)
0099 set(handles.slider2,'Visible',state)
0100 set(handles.col_vec,'Visible',state)
0101 set(handles.Color_title,'Visible',state)
0102 set(handles.color_code,'Visible',state)
0103 set(handles.vec_col_bar,'Visible',state)
0104 set(handles.record,'Visible',state)
0105 set(handles.AutoVecColor,'Visible',state)
0106 set(handles.decimate4,'Visible',state)
0107 set(handles.min_C_title,'Visible',state)
0108 set(handles.max_C_title,'Visible',state)
0109 set(handles.MenuEditVectors,'Enable',state)

Generated on Fri 13-Nov-2009 11:17:03 by m2html © 2003