Changeset 598 for trunk/src/uvmat.m
- Timestamp:
- Apr 2, 2013, 9:13:42 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r596 r598 1852 1852 end 1853 1853 if exist(imaname_1,'file') 1854 num_j2=num_j1+1; 1855 set(handles.j2,'String',num2str (num_j2));1854 num_j2=num_j1+1;% look by default for the next j index as the second file 1855 set(handles.j2,'String',num2stra(num_j2,NomType)); 1856 1856 else 1857 1857 imaname_1=fullfile_uvmat(RootPath,SubDir,RootFile,Ext,NomType,num_i1+1,[],num_j1); … … 2602 2602 set(handles.ListObject_1,'Visible','off') 2603 2603 [PlotType,PlotParamOut]=plot_field(UvData.Field,handles.PlotAxes,read_GUI(handles.uvmat)); 2604 %errormsg=fill_GUI(PlotParamOut,handles.uvmat); 2605 write_plot_param(handles,PlotParamOut) %update the auto plot parameters 2604 errormsg=fill_GUI(PlotParamOut,handles.uvmat); 2605 for list={'Scalar','Vectors'} 2606 if ~isfield(PlotParamOut,list{1}) 2607 set(handles.(list{1}),'Visible','off') 2608 end 2609 end 2610 %write_plot_param(handles,PlotParamOut) %update the auto plot parameters 2606 2611 2607 2612 %% 2D or 3D fieldname are generally projected … … 2711 2716 [PlotType,PlotParamOut]=plot_field(ObjectData,haxes(imap),PlotParam{imap},PosColorbar{imap}); 2712 2717 if imap==1 2713 errormsg=fill_GUI(PlotParamOut,handles.uvmat);2718 errormsg=fill_GUI(PlotParamOut,handles.uvmat); 2714 2719 else 2715 2720 errormsg=fill_GUI(PlotParamOut,view_field_handle); 2716 2721 end 2717 %write_plot_param(plot_handles{imap},PlotParamOut) %update the auto plot parameters 2722 for list={'Scalar','Vectors'} 2723 if ~isfield(PlotParamOut,list{1}) 2724 set(plot_handles{imap}.(list{1}),'Visible','off') 2725 end 2726 end 2718 2727 if isfield(Field,'CoordMesh')&&~isempty(Field.CoordMesh) 2719 2728 ObjectData.CoordMesh=Field.CoordMesh; % gives an estimated mesh size (useful for mouse action on the plot) … … 4377 4386 [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the GUI view_field); 4378 4387 errormsg=fill_GUI(PlotParam,hview_field); 4388 for list={'Scalar','Vectors'} 4389 if ~isfield(PlotParamOut,list{1}) 4390 set(hhview_field.(list{1}),'Visible','off') 4391 end 4392 end 4379 4393 %write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object 4380 4394 haxes=findobj(hview_field,'tag','axes3'); … … 5173 5187 % Hints: get(hObject,'String') returns contents of TransformPath as text 5174 5188 % str2double(get(hObject,'String')) returns contents of TransformPath as a double 5189 5190 5191 %TODO: use to modify fill_GUI 5192 %'write_plot_param': update the plotting parameters on the uvmat or view_field interface after a plotting operation 5193 function write_plot_param(handles,PlotParam) 5194 %% coordinates 5195 if isempty(PlotParam.Coordinates) 5196 set(handles.Coordinates,'Visible','off') 5197 set(handles.PlotAxes,'Visible','off') 5198 set(handles.text_display,'Visible','off') 5199 set(handles.TableDisplay,'Visible','on') 5200 else 5201 set(handles.Coordinates,'Visible','on') 5202 set(handles.PlotAxes,'Visible','on') 5203 set(handles.text_display,'Visible','on') 5204 if isfield(handles,'TableDisplay') 5205 set(handles.TableDisplay,'Visible','off') 5206 end 5207 Coordinates=PlotParam.Coordinates; 5208 if isfield(Coordinates,'CheckFixAspectRatio') 5209 if Coordinates.CheckFixAspectRatio 5210 set(handles.CheckFixAspectRatio,'Value',1) 5211 else 5212 set(handles.CheckFixAspectRatio,'Value',0) 5213 5214 end 5215 end 5216 if isfield(Coordinates,'AspectRatio') 5217 set(handles.num_AspectRatio,'String',num2str(Coordinates.AspectRatio)) 5218 end 5219 if isfield(Coordinates,'MinX') 5220 set(handles.num_MinX,'String',num2str(Coordinates.MinX,4)); 5221 set(handles.num_MaxX,'String',num2str(Coordinates.MaxX,4)); 5222 set(handles.num_MinY,'String',num2str(Coordinates.MinY,4)); 5223 set(handles.num_MaxY,'String',num2str(Coordinates.MaxY,4)); 5224 else 5225 set(handles.num_MinX,'String',''); 5226 set(handles.num_MaxX,'String',''); 5227 set(handles.num_MinY,'String',''); 5228 set(handles.num_MaxY,'String',''); 5229 end 5230 end 5231 5232 %% scalar or image parameters 5233 if isfield(PlotParam,'Scalar') 5234 set(handles.Scalar,'Visible','on') 5235 if isfield(PlotParam.Scalar,'MaxA') 5236 set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3)); 5237 end 5238 if isfield(PlotParam.Scalar,'MinA') 5239 set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3)); 5240 end 5241 if isfield(PlotParam.Scalar,'IncrA') 5242 set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3)) 5243 end 5244 set(handles.CheckBW,'Value',PlotParam.Scalar.CheckBW) 5245 if isfield(PlotParam.Scalar,'Opacity')&&isfield(handles,'num_Opacity') 5246 set(handles.num_Opacity,'String',num2str(PlotParam.Scalar.Opacity)) 5247 end 5248 else 5249 set(handles.Scalar,'Visible','off') 5250 end 5251 5252 %% parameter for vector field 5253 if isfield(PlotParam,'Vectors') 5254 set(handles.Vectors,'Visible','on') 5255 if isfield(PlotParam.Vectors,'VecScale') 5256 set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3)) 5257 end 5258 if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC') 5259 MinC=PlotParam.Vectors.MinC; 5260 MaxC=PlotParam.Vectors.MaxC; 5261 set(handles.num_MinVec,'String', num2str(MinC,3)); 5262 set(handles.num_MaxVec,'String',num2str(MaxC,3)); 5263 list=get(handles.ColorCode,'String'); 5264 ichoice=get(handles.ColorCode,'Value'); 5265 color_option=list{ichoice}; 5266 test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr'); 5267 if test3color% need to update color thresholds 5268 set(handles.num_ColCode1,'Visible','on') 5269 set(handles.num_ColCode2,'Visible','on') 5270 set(handles.Slider1,'Visible','on') 5271 set(handles.Slider2,'Visible','on') 5272 %ColCode1=MinC+(MaxC-MinC)*PlotParam.Vectors.ColCode1; 5273 %ColCode2=MinC+(MaxC-MinC)*PlotParam.Vectors.ColCode2; 5274 % ColCode1=MinC+(MaxC-MinC)*PlotParam.Vectors.ColCode1; 5275 %ColCode2=MinC+(MaxC-MinC)*PlotParam.Vectors.ColCode2; 5276 set(handles.num_ColCode1,'String',num2str(PlotParam.Vectors.ColCode1,3)) 5277 set(handles.num_ColCode2,'String',num2str(PlotParam.Vectors.ColCode2,3)) 5278 set(handles.Slider1,'Value',(PlotParam.Vectors.ColCode1-MinC)/(MaxC-MinC)) 5279 set(handles.Slider2,'Value',(PlotParam.Vectors.ColCode2-MinC)/(MaxC-MinC)) 5280 else 5281 set(handles.num_ColCode1,'Visible','off') 5282 set(handles.num_ColCode2,'Visible','off') 5283 set(handles.Slider1,'Visible','off') 5284 set(handles.Slider2,'Visible','off') 5285 end 5286 end 5287 else 5288 set(handles.Vectors,'Visible','off') 5289 if isfield(handles,'edit_vect') 5290 set(handles.edit_vect,'Visible','off') 5291 set(handles.record,'Visible','off') 5292 end 5293 end
Note: See TracChangeset
for help on using the changeset viewer.