Changeset 872 for trunk/src/plot_field.m


Ignore:
Timestamp:
Feb 16, 2015, 3:31:22 PM (9 years ago)
Author:
sommeria
Message:

bugs corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r871 r872  
    202202    end       
    203203    PlotParamOut.Axes=plot_profile(Data,CellInfo(index_1D),haxes,PlotParamOut.Axes,CheckHold);%
    204     if isfield(PlotParamOut,'Vectors')
    205         PlotParamOut=rmfield(PlotParamOut,'Vectors');
    206     end
    207     if isfield(PlotParamOut,'Scalar')
    208         PlotParamOut=rmfield(PlotParamOut,'Scalar');
    209     end   
     204    if isempty(index_2D)
     205        if isfield(PlotParamOut,'Vectors')
     206            PlotParamOut=rmfield(PlotParamOut,'Vectors');
     207        end
     208        if isfield(PlotParamOut,'Scalar')
     209            PlotParamOut=rmfield(PlotParamOut,'Scalar');
     210        end
     211    end
    210212    if testzoomaxes
    211213        [zoomaxes,PlotParamOut.Axes]=plot_profile(Data,CellInfo(index_1D),zoomaxes,PlotParamOut.Axes,CheckHold);
     
    572574%% give statistics for pdf
    573575ind_var=find(testplot);
    574 if numel(ind_var)==1 && isfield(data,'VarAttribute') && isfield(data.VarAttribute{ind_var},'Role') &&...
    575         strcmp(data.VarAttribute{ind_var}.Role,'histo')
     576if numel(ind_var)==1 && isfield(data,'VarAttribute') &&numel(data.VarAttribute)>=ind_var &&...
     577        isfield(data.VarAttribute{ind_var},'Role') && strcmp(data.VarAttribute{ind_var}.Role,'histo')
    576578    pdf_val=data.(data.ListVarName{ind_var});
    577579    x=coord_x{1};
Note: See TracChangeset for help on using the changeset viewer.