Changeset 334 for trunk/src/plot_field.m


Ignore:
Timestamp:
Dec 14, 2011, 1:33:18 PM (9 years ago)
Author:
sommeria
Message:

bugs corrected in fileparts_uvmat and find_file_series
name2dispaly replaced by fileparts_uvmat in uvmat, but not in other functions
bug corrected in plot_field, introduction of FileType? in read_field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r313 r334  
    480480    PlotParam=[];
    481481end
     482if ~isfield(PlotParam,'Coordinates')
     483    PlotParam.Coordinates=[];
     484end
    482485if ~isfield(PlotParam,'Scalar')
    483486    PlotParam.Scalar=[];
     
    10141017    YMin=[];
    10151018    YMax=[];
    1016     fix_lim=isfield(PlotParam,'CheckFixLimits') && PlotParam.CheckFixLimits;
     1019    fix_lim=isfield(PlotParam.Coordinates,'CheckFixLimits') && PlotParam.Coordinates.CheckFixLimits;
    10171020    if fix_lim
    1018         if ~isfield(PlotParam,'MinX')||~isfield(PlotParam,'MaxX')||~isfield(PlotParam,'MinY')||~isfield(PlotParam,'MaxY')
    1019             fix_lim=0; %free limits if limits are not set,
    1020         else
    1021             XMin=PlotParam.MinX
    1022             XMax=PlotParam.MaxX;
    1023             YMin=PlotParam.MinY;
    1024             YMax=PlotParam.MaxY;
     1021        if isfield(PlotParam.Coordinates,'MinX')&&isfield(PlotParam.Coordinates,'MaxX')&&isfield(PlotParam.Coordinates,'MinY')&&isfield(PlotParam.Coordinates,'MaxY')
     1022            XMin=PlotParam.Coordinates.MinX;
     1023            XMax=PlotParam.Coordinates.MaxX;
     1024            YMin=PlotParam.Coordinates.MinY;
     1025            YMax=PlotParam.Coordinates.MaxY;
    10251026        end  %else PlotParamOut.XMin =PlotParam.XMin...
    10261027    else
     
    10461047%     PlotParamOut.RangeY=[YMin YMax]; %range of x, to be stored in the user data of the plot axes
    10471048%     if ~fix_lim
    1048         PlotParamOut.MinX=XMin;
    1049         PlotParamOut.MaxX=XMax;
    1050         PlotParamOut.MinY=YMin;
    1051         PlotParamOut.MaxY=YMax;
     1049        PlotParamOut.Coordinates.MinX=XMin;
     1050        PlotParamOut.Coordinates.MaxX=XMax;
     1051        PlotParamOut.Coordinates.MinY=YMin;
     1052        PlotParamOut.Coordinates.MaxY=YMax;
    10521053        if XMax>XMin
    10531054            set(haxes,'XLim',[XMin XMax]);% set x limits of frame in axes coordinates
     
    10601061    set(get(haxes,'XLabel'),'String',[XName ' (' x_units ')']);
    10611062    set(get(haxes,'YLabel'),'String',[YName ' (' y_units ')']);
    1062     PlotParamOut.x_units=x_units;
    1063     PlotParamOut.y_units=y_units;
     1063    PlotParamOut.Coordinates.x_units=x_units;
     1064    PlotParamOut.Coordinates.y_units=y_units;
    10641065end
    10651066%-------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.