Ignore:
Timestamp:
May 9, 2024, 6:51:30 PM (7 weeks ago)
Author:
sommeria
Message:

new display of false vectors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r1133 r1143  
    730730                end
    731731            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       
    738737            if ~isempty(ivar_FF_vec) %&& ~test_false
    739738                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
    740743            end
    741744        end
     
    11951198        vec_V=vec_V(ind_sel);
    11961199        vec_C=vec_C(ind_sel);
    1197         if ~isempty(ivar_F)
    1198            vec_F=vec_F(ind_sel);
    1199         end
     1200%         if ~isempty(ivar_F)
     1201%            vec_F=vec_F(ind_sel);
     1202%         end
    12001203        if ~isempty(ivar_FF_vec)
    12011204           vec_FF=vec_FF(ind_sel);
     
    12081211    % take flags into account: add flag colors to the list of colors
    12091212    nbcolor=size(colorlist,1);
    1210     if test_black
    1211        nbcolor=nbcolor+1;
    1212        colorlist(nbcolor,:)=[0 0 0]; %add black to the list of colors
    1213        if ~isempty(ivar_FF_vec)
    1214             col_vec(vec_F~=1 & vec_F~=0 & vec_FF==0)=nbcolor;
    1215        else
    1216             col_vec(vec_F~=1 & vec_F~=0)=nbcolor;
    1217        end
    1218     end
     1213% % %     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
    12191222    nbcolor=nbcolor+1;
    12201223    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
    12221238            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       
    12271241    end
    12281242    %plot vectors:
Note: See TracChangeset for help on using the changeset viewer.