Changeset 93 for trunk/src/plot_field.m
- Timestamp:
- May 27, 2010, 7:25:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r92 r93 172 172 % check the cells of fields : 173 173 % testnbdim=1; 174 [CellVarIndex,NbDim,VarType,errormsg]=find_field_indices(Data) ;174 [CellVarIndex,NbDim,VarType,errormsg]=find_field_indices(Data) 175 175 176 176 if ~isempty(errormsg) … … 324 324 coord_x_index=[]; 325 325 test_newplot=1; 326 hh=findobj(haxes,'tag','plot_line');326 % hh=findobj(haxes,'tag','plot_line'); 327 327 % num_curve=numel(hh); 328 icurve=0;328 % icurve=0; 329 329 for icell=1:length(CellVarIndex) 330 330 testfalse=0; … … 362 362 end 363 363 eval(['coord_x{icell}=data.' data.ListVarName{coord_x_index} ';']);%coordinate variable set as coord_x 364 testcoordvar=1;364 % testcoordvar=1; 365 365 testplot(coord_x_index)=0; 366 366 if ~isempty(VarType{icell}.ancillary') … … 425 425 eval(['varmean=mean(double(data.' VarName '));']);%mean value 426 426 textmean=[textmean; {[VarName 'mean= ' num2str(varmean,4)]}]; 427 if nbcomponent1==1| nbcomponent2==1427 if nbcomponent1==1|| nbcomponent2==1 428 428 legend_str=[legend_str {VarName}]; %variable with one component 429 429 else %variable with severals components … … 553 553 VarType.coord=VarType.coord(ind_coord); 554 554 end 555 idim_Y=[];555 % idim_Y=[]; 556 556 test_grid=0; 557 557 if ~isempty(ivar_U) && ~isempty(ivar_V)% vector components detected … … 563 563 eval(['vec_U=Data.' Data.ListVarName{ivar_U} ';']) 564 564 eval(['vec_V=Data.' Data.ListVarName{ivar_V} ';']) 565 'TESTplot'566 VarType.coord567 565 if ~isempty(ivar_X) && ~isempty(ivar_Y)% 2D field (with unstructured coordinates or structured ones (then ivar_X and ivar_Y empty) 568 566 eval(['vec_X=Data.' Data.ListVarName{ivar_X} ';']) … … 748 746 end 749 747 if ~isfield(PlotParam.Scalar,'IncrA') 750 PlotParam.Scalar.IncrA= [];751 end 752 if is empty(PlotParam.Scalar.IncrA)% | PlotParam.Scalar.AutoScal==0748 PlotParam.Scalar.IncrA=NaN; 749 end 750 if isnan(PlotParam.Scalar.IncrA)% | PlotParam.Scalar.AutoScal==0 753 751 cont=colbartick(MinA,MaxA); 754 752 intercont=cont(2)-cont(1);%default … … 767 765 sizpx=(AX(end)-AX(1))/(np(2)-1); 768 766 sizpy=(AY(1)-AY(end))/(np(1)-1); 769 x_cont= [AX(1):sizpx:AX(end)]; % pixel x coordinates for image display767 x_cont=AX(1):sizpx:AX(end); % pixel x coordinates for image display 770 768 y_cont=AY(1):-sizpy:AY(end); % pixel x coordinates for image display 771 769 txt=ver;%version of Matlab … … 857 855 %display the colorbar code for B/W images if Poscolorbar not empty 858 856 if siz==2 && exist('PosColorbar','var')&& ~isempty(PosColorbar) 859 if isempty(hcol)| ~ishandle(hcol)857 if isempty(hcol)||~ishandle(hcol) 860 858 hcol=colorbar;%create new colorbar 861 859 end … … 981 979 end 982 980 nb_sel=length(ind_sel); 983 ind_sel=ind_sel( [1:2:nb_sel]);% take half the points on a line981 ind_sel=ind_sel(1:2:nb_sel);% take half the points on a line 984 982 vec_X=vec_X(ind_sel); 985 983 vec_Y=vec_Y(ind_sel);
Note: See TracChangeset
for help on using the changeset viewer.