Changeset 295


Ignore:
Timestamp:
Nov 21, 2011, 5:54:40 PM (13 years ago)
Author:
sommeria
Message:

plotting functions debugged and checked after the introduction of uipanels

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_GUI.m

    r292 r295  
    1515                check_input=1;%default
    1616                switch object_style
     17                    case {'checkbox','pushbutton','radiobutton','togglebutton'}
     18                        input=get(hchild(ichild),'Value');
    1719                    case 'edit'
    1820                        separator=regexp(tag,'_');
     
    3638                            end
    3739                        end
    38                     case 'checkbox'
    39                         input=get(hchild(ichild),'Value');
     40
    4041                        %                         key=tag(7:end);
     42                    case{'Listbox','popupmenu'}
     43                        listinput=get(hchild(ichild),'String');
     44                        value=get(hchild(ichild),'Value');
     45                        input=listinput(value);       
    4146                    otherwise
    4247                        check_input=0;
  • trunk/src/uvmat.m

    r292 r295  
    20782078    return
    20792079end
    2080 %Ext=get(handles.FileExt,'String');
    20812080NomType=get(handles.FileIndex,'UserData');
    20822081%update the z position index
     
    22752274
    22762275%% update the display menu for the first velocity type (first menuline)
    2277 % veltype_handles=[handles.VelType handles.interp1 handles.filter1 handles.civ2 handles.interp2 handles.filter2];
    2278 % if ~isequal(FileType,'netcdf')|| isequal(FieldName,'get_field...')
    2279 %     set(veltype_handles,'Visible','off')
    2280 % else% if isempty(ParamOut.VelType) && ~isequal(FieldName,'get_field...')
    2281 %     set_veltype_display(veltype_handles,ParamOut.CivStage)%update the display of available velocity types for the first field
    2282 %     if isempty(ParamOut.VelType)
    2283 %         reset_vel_type(veltype_handles)
    2284 %     else
    2285 %         handle1=eval(['handles.' ParamOut.VelType]);
    2286 %         reset_vel_type(veltype_handles,handle1)
    2287 %     end
    2288 % end
    22892276test_veltype=0;
    22902277if ~isequal(FileType,'netcdf')|| isequal(FieldName,'get_field...')
     
    23092296
    23102297%% update the display menu for the second velocity type (second menuline)
    2311 % if ~isempty(filename_1)
    2312 %     veltype_handles_1=[handles.VelType_1 handles.interp1_1 handles.filter1_1 handles.civ2_1 handles.interp2_1 handles.filter2_1];
    2313 %     if ~isequal(FileType_1,'netcdf')|| isequal(FieldName_1,'get_field...')
    2314 %         set(veltype_handles_1,'Visible','off')
    2315 %         %reset_vel_type(veltype_handles_1)
    2316 %     else %if isempty(VelType_1) && ~isequal(FieldName_1,'get_field...')
    2317 %         set_veltype_display(veltype_handles_1,ParamOut_1.CivStage)%update the display of available velocity types for the first field
    2318 %         if isempty(ParamOut_1.VelType)
    2319 %             reset_vel_type(veltype_handles_1)
    2320 %         else
    2321 %             handle1=eval(['handles.' ParamOut_1.VelType '_1']);
    2322 %             reset_vel_type(veltype_handles_1,handle1)
    2323 %         end
    2324 %     end
    2325 %     field_index=strcmp(ParamOut_1.FieldName,ParamOut_1.FieldList);
    2326 %     set(handles.Fields_1,'String',ParamOut_1.FieldList); %update the field menu
    2327 %     set(handles.Fields_1,'Value',find(field_index,1))
    2328 % end
    23292298test_veltype_1=0;
    23302299if isempty(filename_1)
     
    24572426        ZName=UvData.Field.ListVarName{VarType{imax}.coord_z};
    24582427    else
    2459        NbDim=2;
    2460     end
    2461 elseif numel(VarType)>=imax && numel(VarType{imax}.coord)>=NbDim && VarType{imax}.coord(NbDim)>0 %structured coordinate 
     2428        NbDim=2;
     2429    end
     2430elseif numel(VarType)>=imax && numel(VarType{imax}.coord)>=NbDim && VarType{imax}.coord(NbDim)>0 %structured coordinate
    24622431    XName=UvData.Field.ListVarName{VarType{imax}.coord(NbDim)};
    24632432    if NbDim>1
    24642433        YName=UvData.Field.ListVarName{VarType{imax}.coord(NbDim-1)}; %structured coordinates
    24652434    end
    2466 else
    2467 %     errormsg='input field coordinates not defined';
    2468 %     return
    24692435end
    24702436if NbDim==3
     
    25892555    set(handles.list_object_2,'String',list_object);
    25902556end
    2591 % if ~isfield(UvData.Object{1},'plotaxes')
    2592 %     UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis
    2593 % end
    25942557testnewseries=UvData.NewSeries;
    25952558UvData.NewSeries=0;% put to 0 the test for a new field series (set by RootPath_callback)
     
    26032566
    26042567%% Plot the projections on the selected  projection objects
    2605 
    26062568% main projection object (uvmat display)
    26072569list_object=get(handles.list_object_1,'String');
     
    31583120field= list_fields{index_fields(1)}; % selected string
    31593121if isequal(field,'get_field...')
    3160      set(handles.FixVelType,'visible','off')
    3161       set(handles.VelType,'visible','off')
    3162        set(handles.VelType_1,'visible','off')
    3163 %      veltype_handles=[handles.VelType handles.interp1 handles.filter1 handles.civ2 handles.interp2 handles.filter2];
    3164 %      set_veltype_display(veltype_handles,0) % unvisible civ buttons
    3165      filename=read_file_boxes(handles);
    3166      hget_field=findobj(allchild(0),'name','get_field');
    3167      if ~isempty(hget_field)
    3168          delete(hget_field)
    3169      end
    3170      hget_field=get_field(filename);
    3171      set(hget_field,'Name','get_field')       
    3172      hhget_field=guidata(hget_field);
    3173      set(hhget_field.list_fig,'Value',1)
    3174      set(hhget_field.list_fig,'String',{'uvmat'})
    3175      set(handles.transform_fct,'Value',1)% no transform by default
    3176      set(handles.path_transform,'String','')
     3122    set(handles.FixVelType,'visible','off')
     3123    set(handles.VelType,'visible','off')
     3124    set(handles.VelType_1,'visible','off')
     3125    filename=read_file_boxes(handles);
     3126    hget_field=findobj(allchild(0),'name','get_field');
     3127    if ~isempty(hget_field)
     3128        delete(hget_field)
     3129    end
     3130    hget_field=get_field(filename);
     3131    set(hget_field,'Name','get_field')
     3132    hhget_field=guidata(hget_field);
     3133    set(hhget_field.list_fig,'Value',1)
     3134    set(hhget_field.list_fig,'String',{'uvmat'})
     3135    set(handles.transform_fct,'Value',1)% no transform by default
     3136    set(handles.path_transform,'String','')
    31773137    return %no action
    31783138end
     
    31863146[P,F,str1,str2,str_a,str_b,E,NomType]=name2display(['xxx' get(handles.FileIndex,'String') FileExt]);
    31873147NomTypeNew=NomType;%default
    3188 if isequal(field,'image')
    3189     % transform netc type to the corresponding image type
    3190 %     if isequal(NomType,'_i1-i2_j')||isequal(NomType,'_i_j1-j2')|| isequal(NomType,'#_ab')|| isequal(NomType,'_i1-i2')
    3191 %         UvData.SubDir=get(handles.SubDir,'String'); %preserve the subdir in memory
    3192 %         if ~isempty(UvData.SubDir) && (isequal(UvData.SubDir(1),'/')||isequal(UvData.SubDir(1),'/'))
    3193 %             UvData.SubDir(1)=[];
    3194 %         end
    3195 %         set(handles.SubDir,'String','')
    3196 %         set(handles.FileExt,'String','.png');
    3197         if isequal(NomType,'_i1-i2_j')||isequal(NomType,'_i_j1-j2')
    3198             NomTypeNew='_i_j';
    3199         elseif isequal(NomType,'#_ab')
    3200             NomTypeNew='#a';
    3201         elseif isequal(NomType,'_i1-i2')
    3202             NomTypeNew='_i';
    3203         end 
    3204         imagename=name_generator(FileBase,str2double(str1),str2double(str_a),'.png',NomTypeNew,1,str2double(str2),str2double(str_b),'');
    3205         if ~exist(imagename,'file')
    3206                 [FileName,PathName] = uigetfile( ...
    3207            {'*.png;*.jpg;*.tif;*.avi;*.AVI;*.vol', ' (*.png, .tif, *.avi,*.vol)';
     3148if isequal(field,'image')
     3149    if isequal(NomType,'_i1-i2_j')||isequal(NomType,'_i_j1-j2')
     3150        NomTypeNew='_i_j';
     3151    elseif isequal(NomType,'#_ab')
     3152        NomTypeNew='#a';
     3153    elseif isequal(NomType,'_i1-i2')
     3154        NomTypeNew='_i';
     3155    end
     3156    imagename=name_generator(FileBase,str2double(str1),str2double(str_a),'.png',NomTypeNew,1,str2double(str2),str2double(str_b),'');
     3157    if ~exist(imagename,'file')
     3158        [FileName,PathName] = uigetfile( ...
     3159            {'*.png;*.jpg;*.tif;*.avi;*.AVI;*.vol', ' (*.png, .tif, *.avi,*.vol)';
    32083160            '*.jpg',' jpeg image files'; ...
    32093161            '*.png','.png image files'; ...
     
    32123164            '*.vol','.volume images (png)'; ...
    32133165            '*.*',  'All Files (*.*)'}, ...
    3214             'Pick an image',imagename);           
    3215             % display the selected field and related information
    3216            imagename=[PathName FileName];
    3217         end
    3218         display_file_name(hObject, eventdata, handles,imagename)%display the image
    3219         return
    3220 %     end
    3221 %     veltype_handles=[handles.VelType handles.interp1 handles.filter1 handles.civ2 handles.interp2 handles.filter2];
    3222 %     set_veltype_display(veltype_handles,0) % unvisible civ buttons
     3166            'Pick an image',imagename);   
     3167        imagename=[PathName FileName];
     3168    end
     3169     % display the selected field and related information
     3170    display_file_name(hObject, eventdata, handles,imagename)%display the image
     3171    return
    32233172else
    32243173    ext=get(handles.FileExt,'String');
    32253174    if ~isequal(ext,'.nc') %find the new NomType if the previous display was not already a netcdf file
    3226                 [FileName,PathName] = uigetfile( ...
    3227            {'*.nc', ' (*.nc)';
     3175        [FileName,PathName] = uigetfile( ...
     3176            {'*.nc', ' (*.nc)';
    32283177            '*.nc',' netcdf files'; ...
    32293178            '*.*',  'All Files (*.*)'}, ...
    3230             'Pick a netcdf file',FileBase);           
    3231             % display the selected field and related information
    3232            filename=[PathName FileName];
     3179            'Pick a netcdf file',FileBase);
     3180        filename=[PathName FileName];
     3181        % display the selected field and related information
    32333182        display_file_name(hObject, eventdata, handles,filename)
    32343183        return
    3235        %  MenuBrowse_Callback(hObject, eventdata, handles)
    3236     end
    3237 %     if isequal(field,'vort') || isequal(field,'div') || isequal(field,'strain')
    3238 % %         set(handles.VelType,'BackgroundColor',[0.702 0.702 0.702]) % put their color to grey
    3239 % %         set(handles.civ2,'BackgroundColor',[0.702 0.702 0.702])
    3240 % %         set(handles.interp1,'BackgroundColor',[0.702 0.702 0.702])
    3241 % %         set(handles.interp2,'BackgroundColor',[0.702 0.702 0.702])
    3242 %     elseif isequal(field,'more...');
    3243 %         set(handles.VelType,'BackgroundColor',[0.702 0.702 0.702]) % put their color to grey
    3244 %         set(handles.civ2,'BackgroundColor',[0.702 0.702 0.702])
    3245 %         str=calc_field;%get the list of available scalars by the function calc_scal
    3246 %         [ind_answer] = listdlg('PromptString','Select a file:',...
    3247 %                 'SelectionMode','single',...
    3248 %                 'ListString',str);
    3249 %        % edit the choice in the field and action menu
    3250 %         scalar=cell2mat(str(ind_answer));
    3251 %         menu=update_menu(handles.Fields,scalar);
    3252 %         menu=[{''};menu];
    3253 %         set(handles.Fields_1,'String',menu);% store the selected scalar type
    3254 %     end
     3184    end
    32553185end
    32563186indices=name_generator('',str2double(str1),str2double(str_a),'',NomTypeNew,1,str2double(str2),str2double(str_b),'');
     
    32703200end
    32713201setfield(handles);% update the field structure ('civ1'....)
    3272 
    32733202if ~(isfield(UvData,'NewSeries')&&isequal(UvData.NewSeries,1))
    32743203    run0_Callback(hObject, eventdata, handles)
     
    32943223%read the rootfile input display
    32953224[FileName,RootPath,FileBase,FileIndices,FileExt_1]=read_file_boxes_1(handles);
    3296 [P,F,str1,str2,str_a,str_b,E,NomType]=name2display(['xxx' get(handles.FileIndex,'String') FileExt_1]);
     3225[P,F,str1,str2,str_a,str_b,E,NomType_1]=name2display(['xxx' get(handles.FileIndex,'String') FileExt_1]);
    32973226% if isempty(FileExt_prev)|| strcmp(FileExt_prev,'')
    32983227%     FileExt_1=get(handles.FileExt,'String');
     
    33003229%     FileExt_1=FileExt_prev;
    33013230% end
    3302 NomType_1=get(handles.FileIndex_1,'UserData');
     3231% NomType_1=get(handles.FileIndex_1,'UserData');
    33033232if isempty(NomType_1)|| strcmp(NomType_1,'')
    3304     NomType_1=get(handles.FileIndex,'UserData');
     3233    [FileName,RootPath,FileBase,FileIndices,FileExt_1]=read_file_boxes(handles);
     3234    [P,F,str1,str2,str_a,str_b,E,NomType_1]=name2display(['xxx' get(handles.FileIndex,'String') FileExt_1]);
     3235%     NomType_1=get(handles.FileIndex,'UserData');
    33053236end
    33063237NomTypeNew=NomType_1;%default
     
    33723303    set(handles.SubDir_1,'Visible','on')
    33733304    if ~isequal(FileExt_1,'.nc') %find the new NomType if the previous display was not already a netcdf file
    3374 %         veltype_handles=[handles.VelType_1 handles.interp1_1 handles.filter1_1 handles.civ2_1 handles.interp2_1 handles.filter2_1];
    3375 %         set_veltype_display(veltype_handles,6); % make all civ buttons visible
    33763305        RootPath_1=get(handles.RootPath_1,'String');
    33773306        RootFile_1=get(handles.RootFile_1,'String');
     
    42594188set(handles.VecColBar,'Cdata',A)
    42604189
    4261 
    42624190%-------------------------------------------------------------------
    42634191function update_plot(handles)
    42644192%-------------------------------------------------------------------
    4265 haxes= handles.axes3;
    42664193UvData=get(handles.uvmat,'UserData');
    4267 AxeData=UvData.axes3;
    4268 %PlotParam=read_plot_param(handles);
     4194AxeData=UvData.axes3;% retrieve the current plotted data
    42694195PlotParam=read_GUI(handles.uvmat);
    4270 [PP,PlotParamOut]= plot_field(AxeData,haxes,PlotParam);
     4196[PP,PlotParamOut]= plot_field(AxeData,handles.axes3,PlotParam);
    42714197write_plot_param(handles,PlotParamOut); %update the auto plot parameters
    42724198
     
    46494575                    end
    46504576                end
    4651                 if isfield(ObjectData,'Coord')& isfield(ObjectData,'Style')
     4577                if isfield(ObjectData,'Coord')&& isfield(ObjectData,'Style')
    46524578                    if isequal(ObjectData.Style,'polygon')
    46534579                        X=ObjectData.Coord(:,1);
     
    47224648function MenuGrid_Callback(hObject, eventdata, handles)
    47234649%------------------------------------------------------------------------
    4724 %UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    4725 
    47264650%suppress the other options if grid is chosen
    47274651set(handles.edit_vect,'Value',0)
     
    47354659val=get(handles.transform_fct,'Value');
    47364660set_grid(FileName,CoordList{val});% call the set_object interface
    4737 %set(handles.uvmat,'UserData',UvData);
    47384661
    47394662%------------------------------------------------------------------------
     
    47744697    param.index_fields_1=param.index_fields_1-1;
    47754698end
    4776 % if isequal(get(handles.VelType,'Visible'),'on')
    4777 %     param.VelTypeMenu=get(handles.VelType,'String');
    4778 %     param.VelTypeIndex=get(handles.VelType,'Value');
    4779 % end
    4780 % param.civ1=get(handles.VelType,'Value');
    4781 % param.civ2=get(handles.civ2,'Value');
    4782 % param.interp1=get(handles.interp1,'Value');
    4783 % param.interp2=get(handles.interp2,'Value');
    4784 % param.filter1=get(handles.filter1,'Value');
    4785 % param.filter2=get(handles.filter2,'Value');
    47864699param.menu_coord_str=get(handles.transform_fct,'String');
    47874700param.menu_coord_val=get(handles.transform_fct,'Value');
    4788 
    47894701series(param); %run the series interface
    47904702
  • trunk/src/view_field.m

    r292 r295  
    268268% --- Executes on button press in 'FixLimits'.
    269269%-------------------------------------------------------------------
    270 function FixLimits_Callback(hObject, eventdata, handles)
    271 test=get(handles.FixLimits,'Value');
     270function CheckFixLimits_Callback(hObject, eventdata, handles)
     271test=get(handles.CheckFixLimits,'Value');
    272272if test
    273     set(handles.FixLimits,'BackgroundColor',[1 1 0])
    274 else
    275     set(handles.FixLimits,'BackgroundColor',[0.7 0.7 0.7])
    276 end
     273    set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
     274else
     275    set(handles.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7])
     276end
     277update_plot(handles)
    277278
    278279%-------------------------------------------------------------------
    279280% --- Executes on button press in FixEqual.
    280 function FixEqual_Callback(hObject, eventdata, handles)
     281function CheckFixEqual_Callback(hObject, eventdata, handles)
    281282test=get(handles.FixEqual,'Value');
    282283if test
    283     set(handles.FixEqual,'BackgroundColor',[1 1 0])
     284    set(handles.CheckFixEqual,'BackgroundColor',[1 1 0])
    284285    cla(handles.axes3)
    285     update_plot(handles)
    286 else
    287     set(handles.FixEqual,'BackgroundColor',[0.7 0.7 0.7])
    288     update_plot(handles)
    289 end
    290 
     286else
     287    set(handles.CheckFixEqual,'BackgroundColor',[0.7 0.7 0.7])
     288end
     289 update_plot(handles)
    291290
    292291%-------------------------------------------------------------------
     
    497496
    498497%------------------------------------------------------------------------
    499 function MinX_Callback(hObject, eventdata, handles)
    500 %------------------------------------------------------------------------
    501 set(handles.FixLimits,'Value',1) %suppress auto mode
    502 set(handles.FixLimits,'BackgroundColor',[1 1 0])
     498function num_MinX_Callback(hObject, eventdata, handles)
     499%------------------------------------------------------------------------
     500set(handles.CheckFixLimits,'Value',1) %suppress auto mode
     501set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    503502update_plot(handles);
    504503
    505504%------------------------------------------------------------------------
    506 function MaxX_Callback(hObject, eventdata, handles)
    507 %------------------------------------------------------------------------
    508 set(handles.FixLimits,'Value',1) %suppress auto mode
    509 set(handles.FixLimits,'BackgroundColor',[1 1 0])
     505function num_MaxX_Callback(hObject, eventdata, handles)
     506%------------------------------------------------------------------------
     507set(handles.CheckFixLimits,'Value',1) %suppress auto mode
     508set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    510509update_plot(handles);
    511510
    512511%------------------------------------------------------------------------
    513 function MinY_Callback(hObject, eventdata, handles)
     512function num_MinY_Callback(hObject, eventdata, handles)
    514513%------------------------------------------
    515 set(handles.FixLimits,'Value',1) %suppress auto mode
    516 set(handles.FixLimits,'BackgroundColor',[1 1 0])
     514set(handles.CheckFixLimits,'Value',1) %suppress auto mode
     515set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    517516update_plot(handles);
    518517
    519518%------------------------------------------------------------------------
    520 function MaxY_Callback(hObject, eventdata, handles)
    521 %------------------------------------------------------------------------
    522 set(handles.FixLimits,'Value',1) %suppress auto mode
    523 set(handles.FixLimits,'BackgroundColor',[1 1 0])
     519function num_MaxY_Callback(hObject, eventdata, handles)
     520%------------------------------------------------------------------------
     521set(handles.CheckFixLimits,'Value',1) %suppress auto mode
     522set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    524523update_plot(handles);
    525524
    526525%-----------------------------------------------------------------
    527 function MinA_Callback(hObject, eventdata, handles)
     526function num_MinA_Callback(hObject, eventdata, handles)
    528527%------------------------------------------
    529 set(handles.FixScal,'Value',1) %suppress auto mode
    530 set(handles.FixScal,'BackgroundColor',[1 1 0])
     528set(handles.CheckFixScalar,'Value',1) %suppress auto mode
     529set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
    531530update_plot(handles)
    532531
    533532%-----------------------------------------------------------------
    534 function MaxA_Callback(hObject, eventdata, handles)
     533function num_MaxA_Callback(hObject, eventdata, handles)
    535534%--------------------------------------------
    536 set(handles.FixScal,'Value',1) %suppress auto mode
    537 set(handles.FixScal,'BackgroundColor',[1 1 0])
     535set(handles.CheckFixScalar,'Value',1) %suppress auto mode
     536set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
    538537update_plot(handles)
    539538
    540539%-----------------------------------------------
    541 function FixScal_Callback(hObject, eventdata, handles)
     540function CheckFixScalar_Callback(hObject, eventdata, handles)
    542541%--------------------------------------------
    543 test=get(handles.FixScal,'Value');
     542test=get(handles.CheckFixScalar,'Value');
    544543if test
    545     set(handles.FixScal,'BackgroundColor',[1 1 0])
    546 else
    547     set(handles.FixScal,'BackgroundColor',[0.7 0.7 0.7])
     544    set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
     545else
     546    set(handles.CheckFixScalar,'BackgroundColor',[0.7 0.7 0.7])
    548547    update_plot(handles);
    549548%     set(handles.MinA,'String',num2str(ScalOut.MinA,3))
     
    552551
    553552%-------------------------------------------------------------------
    554 function BW_Callback(hObject, eventdata, handles)
    555 %-------------------------------------------------------------------
    556 update_plot(handles)
    557 
    558 %-------------------------------------------------------------------
    559 function Contours_Callback(hObject, eventdata, handles)
     553function CheckBW_Callback(hObject, eventdata, handles)
     554%-------------------------------------------------------------------
     555update_plot(handles)
     556
     557%-------------------------------------------------------------------
     558function ListContour_Callback(hObject, eventdata, handles)
    560559%-------------------------------------------------------------------
    561560val=get(handles.Contours,'Value');
     
    606605% --- Executes on selection change in decimate4 (nb_vec/4).
    607606%-------------------------------------------------------
    608 function decimate4_Callback(hObject, eventdata, handles)
    609 'TEST'
     607function CheckDecimate4_Callback(hObject, eventdata, handles)
    610608update_plot(handles)
    611609
     
    687685set(handles.vec_col_bar,'Cdata',A)
    688686
    689 %------------------------------------------------------------------------
    690 function PlotType=update_plot(handles)
    691 %------------------------------------------------------------------------
    692 haxes= handles.axes3;
    693 
    694 %ProjField=get(haxes,'UserData');
    695 ViewFieldData=get(handles.view_field,'UserData');
    696 ProjField=ViewFieldData.axes3;
    697 %ProjField=get(haxes,'UserData');
     687% %------------------------------------------------------------------------
     688% function PlotType=update_plot(handles)
     689% %------------------------------------------------------------------------
     690% haxes= handles.axes3;
     691%
     692% %ProjField=get(haxes,'UserData');
     693% ViewFieldData=get(handles.view_field,'UserData');
     694% ProjField=ViewFieldData.axes3;
     695% %ProjField=get(haxes,'UserData');
     696% PlotParam=read_GUI(handles.view_field);
     697% [PlotType,PlotParamOut]= plot_field(ProjField,haxes,PlotParam,1);
     698% write_plot_param(handles,PlotParamOut); %update the auto plot parameters
     699
     700%-------------------------------------------------------------------
     701function update_plot(handles)
     702%-------------------------------------------------------------------
     703Data=get(handles.view_field,'UserData');
     704AxeData=Data.axes3;% retrieve the current plotted data
    698705PlotParam=read_GUI(handles.view_field);
    699 [PlotType,PlotParamOut]= plot_field(ProjField,haxes,PlotParam,1);
     706[PP,PlotParamOut]= plot_field(AxeData,handles.axes3,PlotParam);
    700707write_plot_param(handles,PlotParamOut); %update the auto plot parameters
    701708
     
    737744delete(hObject)
    738745
    739 
    740 
    741 
    742 
    743 
    744 
    745 % --- Executes on button press in CheckZoom.
    746 function CheckZoom_Callback(hObject, eventdata, handles)
    747 % hObject    handle to CheckZoom (see GCBO)
    748 % eventdata  reserved - to be defined in a future version of MATLAB
    749 % handles    structure with handles and user data (see GUIDATA)
    750 
    751 % Hint: get(hObject,'Value') returns toggle state of CheckZoom
    752 
    753 
    754 % --- Executes on button press in CheckFixLimits.
    755 function CheckFixLimits_Callback(hObject, eventdata, handles)
    756 % hObject    handle to CheckFixLimits (see GCBO)
    757 % eventdata  reserved - to be defined in a future version of MATLAB
    758 % handles    structure with handles and user data (see GUIDATA)
    759 
    760 % Hint: get(hObject,'Value') returns toggle state of CheckFixLimits
    761 
    762 
    763 
    764 function num_MinY_Callback(hObject, eventdata, handles)
    765 % hObject    handle to num_MinY (see GCBO)
    766 % eventdata  reserved - to be defined in a future version of MATLAB
    767 % handles    structure with handles and user data (see GUIDATA)
    768 
    769 % Hints: get(hObject,'String') returns contents of num_MinY as text
    770 %        str2double(get(hObject,'String')) returns contents of num_MinY as a double
    771 
    772 
    773 % --- Executes during object creation, after setting all properties.
    774 function num_MinY_CreateFcn(hObject, eventdata, handles)
    775 % hObject    handle to num_MinY (see GCBO)
    776 % eventdata  reserved - to be defined in a future version of MATLAB
    777 % handles    empty - handles not created until after all CreateFcns called
    778 
    779 % Hint: edit controls usually have a white background on Windows.
    780 %       See ISPC and COMPUTER.
    781 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    782     set(hObject,'BackgroundColor','white');
    783 end
    784 
    785 
    786 
    787 function num_MaxY_Callback(hObject, eventdata, handles)
    788 % hObject    handle to num_MaxY (see GCBO)
    789 % eventdata  reserved - to be defined in a future version of MATLAB
    790 % handles    structure with handles and user data (see GUIDATA)
    791 
    792 % Hints: get(hObject,'String') returns contents of num_MaxY as text
    793 %        str2double(get(hObject,'String')) returns contents of num_MaxY as a double
    794 
    795 
    796 % --- Executes on button press in CheckFixEqual.
    797 function CheckFixEqual_Callback(hObject, eventdata, handles)
    798 % hObject    handle to CheckFixEqual (see GCBO)
    799 % eventdata  reserved - to be defined in a future version of MATLAB
    800 % handles    structure with handles and user data (see GUIDATA)
    801 
    802 % Hint: get(hObject,'Value') returns toggle state of CheckFixEqual
    803 
    804 
    805 
    806 function num_MinX_Callback(hObject, eventdata, handles)
    807 % hObject    handle to num_MinX (see GCBO)
    808 % eventdata  reserved - to be defined in a future version of MATLAB
    809 % handles    structure with handles and user data (see GUIDATA)
    810 
    811 % Hints: get(hObject,'String') returns contents of num_MinX as text
    812 %        str2double(get(hObject,'String')) returns contents of num_MinX as a double
    813 
    814 
    815 
    816 function num_MaxX_Callback(hObject, eventdata, handles)
    817 % hObject    handle to num_MaxX (see GCBO)
    818 % eventdata  reserved - to be defined in a future version of MATLAB
    819 % handles    structure with handles and user data (see GUIDATA)
    820 
    821 % Hints: get(hObject,'String') returns contents of num_MaxX as text
    822 %        str2double(get(hObject,'String')) returns contents of num_MaxX as a double
    823 
    824 
    825 % --- Executes on selection change in ListContour.
    826 function ListContour_Callback(hObject, eventdata, handles)
    827 % hObject    handle to ListContour (see GCBO)
    828 % eventdata  reserved - to be defined in a future version of MATLAB
    829 % handles    structure with handles and user data (see GUIDATA)
    830 
    831 % Hints: contents = cellstr(get(hObject,'String')) returns ListContour contents as cell array
    832 %        contents{get(hObject,'Value')} returns selected item from ListContour
    833 
    834 
    835 % --- Executes on button press in checkbox49.
    836 function checkbox49_Callback(hObject, eventdata, handles)
    837 % hObject    handle to checkbox49 (see GCBO)
    838 % eventdata  reserved - to be defined in a future version of MATLAB
    839 % handles    structure with handles and user data (see GUIDATA)
    840 
    841 % Hint: get(hObject,'Value') returns toggle state of checkbox49
    842 
    843 
    844 
    845 function num_MaxA_Callback(hObject, eventdata, handles)
    846 % hObject    handle to num_MaxA (see GCBO)
    847 % eventdata  reserved - to be defined in a future version of MATLAB
    848 % handles    structure with handles and user data (see GUIDATA)
    849 
    850 % Hints: get(hObject,'String') returns contents of num_MaxA as text
    851 %        str2double(get(hObject,'String')) returns contents of num_MaxA as a double
    852 
    853 
    854 % --- Executes during object creation, after setting all properties.
    855 function num_MaxA_CreateFcn(hObject, eventdata, handles)
    856 % hObject    handle to num_MaxA (see GCBO)
    857 % eventdata  reserved - to be defined in a future version of MATLAB
    858 % handles    empty - handles not created until after all CreateFcns called
    859 
    860 % Hint: edit controls usually have a white background on Windows.
    861 %       See ISPC and COMPUTER.
    862 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    863     set(hObject,'BackgroundColor','white');
    864 end
    865 
    866 
    867 
    868 function num_Npy_Callback(hObject, eventdata, handles)
    869 % hObject    handle to num_Npy (see GCBO)
    870 % eventdata  reserved - to be defined in a future version of MATLAB
    871 % handles    structure with handles and user data (see GUIDATA)
    872 
    873 % Hints: get(hObject,'String') returns contents of num_Npy as text
    874 %        str2double(get(hObject,'String')) returns contents of num_Npy as a double
    875 
    876 
    877 % --- Executes during object creation, after setting all properties.
    878 function num_Npy_CreateFcn(hObject, eventdata, handles)
    879 % hObject    handle to num_Npy (see GCBO)
    880 % eventdata  reserved - to be defined in a future version of MATLAB
    881 % handles    empty - handles not created until after all CreateFcns called
    882 
    883 % Hint: edit controls usually have a white background on Windows.
    884 %       See ISPC and COMPUTER.
    885 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    886     set(hObject,'BackgroundColor','white');
    887 end
    888 
    889 
    890 
    891 function num_IncrA_Callback(hObject, eventdata, handles)
    892 % hObject    handle to num_IncrA (see GCBO)
    893 % eventdata  reserved - to be defined in a future version of MATLAB
    894 % handles    structure with handles and user data (see GUIDATA)
    895 
    896 % Hints: get(hObject,'String') returns contents of num_IncrA as text
    897 %        str2double(get(hObject,'String')) returns contents of num_IncrA as a double
    898 
    899 
    900 % --- Executes on button press in CheckBW.
    901 function CheckBW_Callback(hObject, eventdata, handles)
    902 % hObject    handle to CheckBW (see GCBO)
    903 % eventdata  reserved - to be defined in a future version of MATLAB
    904 % handles    structure with handles and user data (see GUIDATA)
    905 
    906 % Hint: get(hObject,'Value') returns toggle state of CheckBW
    907 
    908 
    909 
    910 function num_MinA_Callback(hObject, eventdata, handles)
    911 % hObject    handle to num_MinA (see GCBO)
    912 % eventdata  reserved - to be defined in a future version of MATLAB
    913 % handles    structure with handles and user data (see GUIDATA)
    914 
    915 % Hints: get(hObject,'String') returns contents of num_MinA as text
    916 %        str2double(get(hObject,'String')) returns contents of num_MinA as a double
    917 
    918 
    919 
    920 function num_Npx_Callback(hObject, eventdata, handles)
    921 % hObject    handle to num_Npx (see GCBO)
    922 % eventdata  reserved - to be defined in a future version of MATLAB
    923 % handles    structure with handles and user data (see GUIDATA)
    924 
    925 % Hints: get(hObject,'String') returns contents of num_Npx as text
    926 %        str2double(get(hObject,'String')) returns contents of num_Npx as a double
    927 
    928 
    929 % --- Executes on button press in CheckFixVectors.
    930 function CheckFixVectors_Callback(hObject, eventdata, handles)
    931 % hObject    handle to CheckFixVectors (see GCBO)
    932 % eventdata  reserved - to be defined in a future version of MATLAB
    933 % handles    structure with handles and user data (see GUIDATA)
    934 
    935 % Hint: get(hObject,'Value') returns toggle state of CheckFixVectors
    936 
    937 
    938 
    939 function num_VecScale_Callback(hObject, eventdata, handles)
    940 % hObject    handle to num_VecScale (see GCBO)
    941 % eventdata  reserved - to be defined in a future version of MATLAB
    942 % handles    structure with handles and user data (see GUIDATA)
    943 
    944 % Hints: get(hObject,'String') returns contents of num_VecScale as text
    945 %        str2double(get(hObject,'String')) returns contents of num_VecScale as a double
    946 
    947 
    948 % --- Executes on selection change in ListColorCode.
    949 function ListColorCode_Callback(hObject, eventdata, handles)
    950 % hObject    handle to ListColorCode (see GCBO)
    951 % eventdata  reserved - to be defined in a future version of MATLAB
    952 % handles    structure with handles and user data (see GUIDATA)
    953 
    954 % Hints: contents = cellstr(get(hObject,'String')) returns ListColorCode contents as cell array
    955 %        contents{get(hObject,'Value')} returns selected item from ListColorCode
    956 
    957 
    958 % --- Executes on selection change in ListColorScalar.
    959 function ListColorScalar_Callback(hObject, eventdata, handles)
    960 % hObject    handle to ListColorScalar (see GCBO)
    961 % eventdata  reserved - to be defined in a future version of MATLAB
    962 % handles    structure with handles and user data (see GUIDATA)
    963 
    964 % Hints: contents = cellstr(get(hObject,'String')) returns ListColorScalar contents as cell array
    965 %        contents{get(hObject,'Value')} returns selected item from ListColorScalar
    966 
    967 
    968 % --- Executes on button press in vecColBar.
    969 function vecColBar_Callback(hObject, eventdata, handles)
    970 % hObject    handle to vecColBar (see GCBO)
    971 % eventdata  reserved - to be defined in a future version of MATLAB
    972 % handles    structure with handles and user data (see GUIDATA)
    973 
    974 
    975 % --- Executes on slider movement.
    976 function Slider1_Callback(hObject, eventdata, handles)
    977 % hObject    handle to Slider1 (see GCBO)
    978 % eventdata  reserved - to be defined in a future version of MATLAB
    979 % handles    structure with handles and user data (see GUIDATA)
    980 
    981 % Hints: get(hObject,'Value') returns position of slider
    982 %        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
    983 
    984 
    985 % --- Executes during object creation, after setting all properties.
    986 function Slider1_CreateFcn(hObject, eventdata, handles)
    987 % hObject    handle to Slider1 (see GCBO)
    988 % eventdata  reserved - to be defined in a future version of MATLAB
    989 % handles    empty - handles not created until after all CreateFcns called
    990 
    991 % Hint: slider controls usually have a light gray background.
    992 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    993     set(hObject,'BackgroundColor',[.9 .9 .9]);
    994 end
    995 
    996 
    997 % --- Executes on slider movement.
    998 function Slider2_Callback(hObject, eventdata, handles)
    999 % hObject    handle to Slider2 (see GCBO)
    1000 % eventdata  reserved - to be defined in a future version of MATLAB
    1001 % handles    structure with handles and user data (see GUIDATA)
    1002 
    1003 % Hints: get(hObject,'Value') returns position of slider
    1004 %        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
    1005 
    1006 
    1007 % --- Executes during object creation, after setting all properties.
    1008 function Slider2_CreateFcn(hObject, eventdata, handles)
    1009 % hObject    handle to Slider2 (see GCBO)
    1010 % eventdata  reserved - to be defined in a future version of MATLAB
    1011 % handles    empty - handles not created until after all CreateFcns called
    1012 
    1013 % Hint: slider controls usually have a light gray background.
    1014 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    1015     set(hObject,'BackgroundColor',[.9 .9 .9]);
    1016 end
    1017 
    1018 
    1019 
    1020 function num_ColCode1_Callback(hObject, eventdata, handles)
    1021 % hObject    handle to num_ColCode1 (see GCBO)
    1022 % eventdata  reserved - to be defined in a future version of MATLAB
    1023 % handles    structure with handles and user data (see GUIDATA)
    1024 
    1025 % Hints: get(hObject,'String') returns contents of num_ColCode1 as text
    1026 %        str2double(get(hObject,'String')) returns contents of num_ColCode1 as a double
    1027 
    1028 
    1029 % --- Executes during object creation, after setting all properties.
    1030 function num_ColCode1_CreateFcn(hObject, eventdata, handles)
    1031 % hObject    handle to num_ColCode1 (see GCBO)
    1032 % eventdata  reserved - to be defined in a future version of MATLAB
    1033 % handles    empty - handles not created until after all CreateFcns called
    1034 
    1035 % Hint: edit controls usually have a white background on Windows.
    1036 %       See ISPC and COMPUTER.
    1037 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    1038     set(hObject,'BackgroundColor','white');
    1039 end
    1040 
    1041 
    1042 
    1043 function num_MaxVec_Callback(hObject, eventdata, handles)
    1044 % hObject    handle to num_MaxVec (see GCBO)
    1045 % eventdata  reserved - to be defined in a future version of MATLAB
    1046 % handles    structure with handles and user data (see GUIDATA)
    1047 
    1048 % Hints: get(hObject,'String') returns contents of num_MaxVec as text
    1049 %        str2double(get(hObject,'String')) returns contents of num_MaxVec as a double
    1050 
    1051 
    1052 % --- Executes during object creation, after setting all properties.
    1053 function num_MaxVec_CreateFcn(hObject, eventdata, handles)
    1054 % hObject    handle to num_MaxVec (see GCBO)
    1055 % eventdata  reserved - to be defined in a future version of MATLAB
    1056 % handles    empty - handles not created until after all CreateFcns called
    1057 
    1058 % Hint: edit controls usually have a white background on Windows.
    1059 %       See ISPC and COMPUTER.
    1060 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    1061     set(hObject,'BackgroundColor','white');
    1062 end
    1063 
    1064 
    1065 % --- Executes on button press in checkbox52.
    1066 function checkbox52_Callback(hObject, eventdata, handles)
    1067 % hObject    handle to checkbox52 (see GCBO)
    1068 % eventdata  reserved - to be defined in a future version of MATLAB
    1069 % handles    structure with handles and user data (see GUIDATA)
    1070 
    1071 % Hint: get(hObject,'Value') returns toggle state of checkbox52
    1072 
    1073 
    1074 
    1075 function num_MinVec_Callback(hObject, eventdata, handles)
    1076 % hObject    handle to num_MinVec (see GCBO)
    1077 % eventdata  reserved - to be defined in a future version of MATLAB
    1078 % handles    structure with handles and user data (see GUIDATA)
    1079 
    1080 % Hints: get(hObject,'String') returns contents of num_MinVec as text
    1081 %        str2double(get(hObject,'String')) returns contents of num_MinVec as a double
    1082 
    1083 
    1084 % --- Executes during object creation, after setting all properties.
    1085 function num_MinVec_CreateFcn(hObject, eventdata, handles)
    1086 % hObject    handle to num_MinVec (see GCBO)
    1087 % eventdata  reserved - to be defined in a future version of MATLAB
    1088 % handles    empty - handles not created until after all CreateFcns called
    1089 
    1090 % Hint: edit controls usually have a white background on Windows.
    1091 %       See ISPC and COMPUTER.
    1092 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    1093     set(hObject,'BackgroundColor','white');
    1094 end
    1095 
    1096 
    1097 % --- Executes on button press in CheckDecimate4.
    1098 function CheckDecimate4_Callback(hObject, eventdata, handles)
    1099 % hObject    handle to CheckDecimate4 (see GCBO)
    1100 % eventdata  reserved - to be defined in a future version of MATLAB
    1101 % handles    structure with handles and user data (see GUIDATA)
    1102 
    1103 % Hint: get(hObject,'Value') returns toggle state of CheckDecimate4
    1104 
    1105 
    1106 % --- Executes on button press in heckHideFalse.
    1107 function heckHideFalse_Callback(hObject, eventdata, handles)
    1108 % hObject    handle to heckHideFalse (see GCBO)
    1109 % eventdata  reserved - to be defined in a future version of MATLAB
    1110 % handles    structure with handles and user data (see GUIDATA)
    1111 
    1112 % Hint: get(hObject,'Value') returns toggle state of heckHideFalse
    1113 
    1114 
    1115 
    1116 function num_Colcode2_Callback(hObject, eventdata, handles)
    1117 % hObject    handle to num_Colcode2 (see GCBO)
    1118 % eventdata  reserved - to be defined in a future version of MATLAB
    1119 % handles    structure with handles and user data (see GUIDATA)
    1120 
    1121 % Hints: get(hObject,'String') returns contents of num_Colcode2 as text
    1122 %        str2double(get(hObject,'String')) returns contents of num_Colcode2 as a double
    1123 
    1124 
    1125 % --- Executes during object creation, after setting all properties.
    1126 function num_Colcode2_CreateFcn(hObject, eventdata, handles)
    1127 % hObject    handle to num_Colcode2 (see GCBO)
    1128 % eventdata  reserved - to be defined in a future version of MATLAB
    1129 % handles    empty - handles not created until after all CreateFcns called
    1130 
    1131 % Hint: edit controls usually have a white background on Windows.
    1132 %       See ISPC and COMPUTER.
    1133 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    1134     set(hObject,'BackgroundColor','white');
    1135 end
    1136 
    1137 
    1138 % --- Executes on button press in CheckHideWarnin.
    1139 function CheckHideWarnin_Callback(hObject, eventdata, handles)
    1140 % hObject    handle to CheckHideWarnin (see GCBO)
    1141 % eventdata  reserved - to be defined in a future version of MATLAB
    1142 % handles    structure with handles and user data (see GUIDATA)
    1143 
    1144 % Hint: get(hObject,'Value') returns toggle state of CheckHideWarnin
  • trunk/src/write_plot_param.m

    r292 r295  
    11%'write_plot_param': update the plotting parameters on the uvmat interface after a plotting operation
    22function 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
     4if 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));
    820    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','');
    1125    end
    1226end
    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 else
    19     set(handles.num_MinX,'String','');
    20     set(handles.num_MaxX,'String','');
    21     set(handles.num_MinY,'String','');
    22     set(handles.num_MaxY,'String','');
    23 end
    2427
    25 %scalar or image parameters
     28%% scalar or image parameters
    2629if isfield(PlotParam,'Scalar')
    27     set_scal_display(handles,'on')
     30    set(handles.Scalar,'Visible','on')
    2831    if isfield(PlotParam.Scalar,'MaxA')
    2932        set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3));
     
    3235        set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3));
    3336    end
    34 
     37   
    3538    if isfield(PlotParam.Scalar,'IncrA')
    3639        set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3))
    3740    end
    3841else
    39     set_scal_display(handles,'off')
     42    set(handles.Scalar,'Visible','off')
    4043end
    4144
    42 % parameter for vector field
     45%% parameter for vector field
    4346if isfield(PlotParam,'Vectors')
    44     set_vect_display(handles,'on')
     47    set(handles.Vectors,'Visible','on')
    4548    if isfield(PlotParam.Vectors,'VecScale')
    4649        set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3))
     
    5356        list=get(handles.color_code,'String');
    5457        ichoice=get(handles.color_code,'Value');
    55         color_option=list{ichoice};
     58        color_option=list{ichoice};
    5659        test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr');
    5760        if test3color% need to update color thresholds
     
    6063            set(handles.slider1,'Visible','on')
    6164            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;
    6667            set(handles.colcode1,'String',num2str(colcode1,3))
    6768            set(handles.colcode2,'String',num2str(colcode2,3))
     
    7677    end
    7778else
    78     set_vect_display(handles,'off')
     79    set(handles.Vectors,'Visible','off')
    7980    if isfield(handles,'edit_vect')
    8081        set(handles.edit_vect,'Visible','off')
     
    8283    end
    8384end
    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 % % end
    116 % 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.