Changeset 1143 for trunk/src/plot_field.m
- Timestamp:
- May 9, 2024, 6:51:30 PM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r1133 r1143 730 730 end 731 731 end 732 if ~isempty(ivar_F)%~(isfield(PlotParam.Vectors,'HideWarning')&& isequal(PlotParam.Vectors.HideWarning,1)) 733 vec_F=Data.(Data.ListVarName{ivar_F}); % warning flags for dubious vectors 734 if ~(isfield(PlotParam.Vectors,'CheckHideWarning') && isequal(PlotParam.Vectors.CheckHideWarning,1)) 735 test_black=1; 736 end 737 end 732 733 % if ~(isfield(PlotParam.Vectors,'CheckHideWarning') && isequal(PlotParam.Vectors.CheckHideWarning,1)) 734 % test_black=1; 735 % end 736 738 737 if ~isempty(ivar_FF_vec) %&& ~test_false 739 738 vec_FF=Data.(Data.ListVarName{ivar_FF_vec}); % flags for false vectors 739 if ~isempty(ivar_F)%~(isfield(PlotParam.Vectors,'HideWarning')&& isequal(PlotParam.Vectors.HideWarning,1)) 740 vec_F=Data.(Data.ListVarName{ivar_F}); % warning flags for dubious vectors 741 vec_FF(find(vec_F==-2))=-2;%set alseFlag to -2 (edge of the search box) 742 end 740 743 end 741 744 end … … 1195 1198 vec_V=vec_V(ind_sel); 1196 1199 vec_C=vec_C(ind_sel); 1197 if ~isempty(ivar_F)1198 vec_F=vec_F(ind_sel);1199 end1200 % if ~isempty(ivar_F) 1201 % vec_F=vec_F(ind_sel); 1202 % end 1200 1203 if ~isempty(ivar_FF_vec) 1201 1204 vec_FF=vec_FF(ind_sel); … … 1208 1211 % take flags into account: add flag colors to the list of colors 1209 1212 nbcolor=size(colorlist,1); 1210 if test_black1211 nbcolor=nbcolor+1;1212 colorlist(nbcolor,:)=[0 0 0]; %add black to the list of colors1213 if ~isempty(ivar_FF_vec)1214 col_vec(vec_F~=1 & vec_F~=0 & vec_FF==0)=nbcolor;1215 else1216 col_vec(vec_F~=1 & vec_F~=0)=nbcolor;1217 end1218 end1213 % % % if test_black 1214 % % % nbcolor=nbcolor+1; 1215 % % % colorlist(nbcolor,:)=[0 0 0]; %add black to the list of colors 1216 % % % if ~isempty(ivar_FF_vec) 1217 % % % col_vec(vec_F~=1 & vec_F~=0 & vec_FF==0)=nbcolor; 1218 % % % else 1219 % % % col_vec(vec_F~=1 & vec_F~=0)=nbcolor; 1220 % % % end 1221 % % % end 1219 1222 nbcolor=nbcolor+1; 1220 1223 if ~isempty(ivar_FF_vec) 1221 if isfield(PlotParam.Vectors,'CheckHideFalse') && PlotParam.Vectors.CheckHideFalse==1 1224 if isfield(PlotParam.Vectors,'CheckShowFalse') && PlotParam.Vectors.CheckShowFalse==1 1225 % colorlist(nbcolor,:)=[1 0 1];% magenta color 1226 colorlist(nbcolor,:)=[0 0 0];% blackcolor 1227 if strcmp(PlotParam.Vectors.FalseCriteria,'ALL') 1228 col_vec(vec_FF~=0)=nbcolor; 1229 else 1230 ind_dot=regexp(PlotParam.Vectors.FalseCriteria,':'); 1231 FalseValue=str2num(PlotParam.Vectors.FalseCriteria(1:ind_dot-1));%get the selected flg number 1232 col_vec(vec_FF==FalseValue)=nbcolor; 1233 nbcolor=nbcolor+1; 1234 colorlist(nbcolor,:)=[NaN NaN NaN];% 1235 col_vec(vec_FF~=0 & vec_FF~=FalseValue)=nbcolor; 1236 end 1237 else 1222 1238 colorlist(nbcolor,:)=[NaN NaN NaN];% no plot of false vectors 1223 else 1224 colorlist(nbcolor,:)=[1 0 1];% magenta color 1225 end 1226 col_vec(vec_FF~=0)=nbcolor; 1239 col_vec(vec_FF~=0)=nbcolor; 1240 end 1227 1241 end 1228 1242 %plot vectors:
Note: See TracChangeset
for help on using the changeset viewer.