Changeset 421 for trunk/src/plot_field.m
- Timestamp:
- May 14, 2012, 7:03:14 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r415 r421 53 53 % .Scalar.CheckFixScal: =0 (default) lower and upper bounds of the scalar representation set to the min and max of the field 54 54 % =1 lower and upper bound imposed by .AMax and .MinA 55 % .Scalar.CheckBW= 1 black and white representation imposed, =0 by default. 55 % .Scalar.CheckBW= 1: black and white representation imposed, =0 color imposed (color scale or rgb), 56 % =[]: automatic (B/W for integer positive scalars, color else) 56 57 % .Scalar.CheckContours= 1: represent scalars by contour plots (Matlab function 'contour'); =0 by default 57 58 % .IncrA : contour interval … … 214 215 if isempty(index_2D) 215 216 plot_plane([],[],[],haxes);%removes images or vector plots if any 216 else 217 else %plot 2D field 217 218 [tild,PlotParamOut,PlotType,errormsg]=plot_plane(Data,CellVarIndex(index_2D),VarType(index_2D),haxes,PlotParam,PosColorbar); 218 219 AxeData.NbDim=2; … … 226 227 plot_profile([],[],[],haxes);% 227 228 end 228 else 229 else %plot 1D field (usual graph y vs x) 229 230 Coordinates=plot_profile(Data,CellVarIndex(index_1D),VarType(index_1D),haxes,PlotParam.Coordinates);% 230 231 if testzoomaxes … … 717 718 718 719 %set the color map 719 if isfield(PlotParam.Scalar,'CheckBW') 720 BW=PlotParam.Scalar.CheckBW; % test for BW gray scale images721 else 720 if isfield(PlotParam.Scalar,'CheckBW') && ~isempty(PlotParam.Scalar.CheckBW) 721 BW=PlotParam.Scalar.CheckBW; %BW=0 color imposed, else gray scale imposed. 722 else % BW imposed automatically chosen 722 723 BW=(siz==2) && (isa(A,'uint8')|| isa(A,'uint16'));% non color images represented in gray scale by default 723 end724 724 PlotParamOut.Scalar.CheckBW=BW; 725 end 725 726 %case of grey level images or contour plot 726 727 if siz==2 … … 1145 1146 xN=NaN*ones(size(xc)); 1146 1147 matx=[xc(:)-uc(:)/2 xc(:)+uc(:)/2 xN(:)]'; 1147 % matx=[xc(:) xc(:)+uc(:) xN(:)]';1148 1148 matx=reshape(matx,1,3*n(2)); 1149 1149 maty=[yc(:)-vc(:)/2 yc(:)+vc(:)/2 xN(:)]'; 1150 % maty=[yc(:) yc(:)+vc(:) xN(:)]';1151 1150 maty=reshape(maty,1,3*n(2)); 1152 1151 … … 1165 1164 matyar=reshape(matyar,1,4*n(2)); 1166 1165 %draw the line or modify the existing ones 1167 tri=reshape(1:3*length(uc),3,[])';1166 % tri=reshape(1:3*length(uc),3,[])'; 1168 1167 isn=isnan(colorlist(icolor,:));%test if color NaN 1169 1168 if 2*icolor > sizh(1) %if icolor exceeds the number of existing ones
Note: See TracChangeset
for help on using the changeset viewer.