Ignore:
Timestamp:
Mar 5, 2018, 12:41:34 PM (6 years ago)
Author:
sommeria
Message:

miscellaneous

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r1027 r1031  
    194194
    195195%% 1D plot (usual graph y vs x)
    196 if isempty(index_1D)
     196if isempty(index_1D)|| ~isempty(index_2D)
    197197    if ~isempty(haxes)
    198198        plot_profile([],[],haxes);%removes usual praphs y vs x in the absence of 1D field plot
     
    653653
    654654% loop on the input field cells
    655 for icell=1:numel(CellInfo) 
     655for icell=1:numel(CellInfo)
    656656    if strcmp(CellInfo{icell}.CoordType,'tps') %do not plot directly tps data (used for projection only)
    657657        continue
     
    688688            if numel(CellInfo{icell}.VarIndex_vector_x)>1
    689689                errormsg='error in plot_field: attempt to plot two vector fields';
    690             return
     690                return
    691691            end
    692692            test_vec=1;
     
    720720            end
    721721            if ~isempty(ivar_F)%~(isfield(PlotParam.Vectors,'HideWarning')&& isequal(PlotParam.Vectors.HideWarning,1))
    722 %                 if test_vec
    723                     vec_F=Data.(Data.ListVarName{ivar_F}); % warning flags for  dubious vectors
    724                     if  ~(isfield(PlotParam.Vectors,'CheckHideWarning') && isequal(PlotParam.Vectors.CheckHideWarning,1))
    725                         test_black=1;
    726                     end
    727 %                 end
     722                vec_F=Data.(Data.ListVarName{ivar_F}); % warning flags for  dubious vectors
     723                if  ~(isfield(PlotParam.Vectors,'CheckHideWarning') && isequal(PlotParam.Vectors.CheckHideWarning,1))
     724                    test_black=1;
     725                end
    728726            end
    729727            if ~isempty(ivar_FF_vec) %&& ~test_false
    730 %                 if test_vec% TODO: deal with FF for structured coordinates
    731                     vec_FF=Data.(Data.ListVarName{ivar_FF_vec}); % flags for false vectors
    732 %                 end
     728                vec_FF=Data.(Data.ListVarName{ivar_FF_vec}); % flags for false vectors
    733729            end
    734730        end
     
    822818            y_units=Data.CoordUnit;
    823819        end
    824     end   
    825 end
     820    end
     821end
     822
    826823PlotParamOut=PlotParam; % output plot parameters equal to input by default
    827824
     
    12651262    PlotParamOut.Axes.y_units=y_units;
    12661263end
    1267 % if isfield(PlotParam,'Axes') && isfield(PlotParam.Axes,'CheckFixAspectRatio') && isequal(PlotParam.Axes.CheckFixAspectRatio,1)
    1268 %     set(haxes,'DataAspectRatioMode','manual')
    1269 %     if isfield(PlotParam.Axes,'AspectRatio')
    1270 %         set(haxes,'DataAspectRatio',[PlotParam.Axes.AspectRatio 1 1])
    1271 %     end
    1272 % else
    1273 %     set(haxes,'DataAspectRatioMode','auto')
    1274 % end
    12751264
    12761265%-------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.