Changeset 575 for trunk/src/uvmat.m


Ignore:
Timestamp:
Feb 27, 2013, 6:39:32 PM (8 years ago)
Author:
sommeria
Message:

various bugs corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r569 r575  
    24982498        end
    24992499    end
    2500     UvData.Field.Mesh=min(Mesh);
     2500    UvData.Field.CoordMesh=min(Mesh);
    25012501    UvData.Field.XMax=max(CoordMax(ind,end));
    25022502    UvData.Field.XMin=min(CoordMin(ind,end));
     
    25082508    end
    25092509    % adjust the mesh to a value 1, 2 , 5 *10^n
    2510     ord=10^(floor(log10(UvData.Field.Mesh)));%order of magnitude
    2511     if UvData.Field.Mesh/ord>=5
    2512         UvData.Field.Mesh=5*ord;
    2513     elseif UvData.Field.Mesh/ord>=2
    2514         UvData.Field.Mesh=2*ord;
     2510    ord=10^(floor(log10(UvData.Field.CoordMesh)));%order of magnitude
     2511    if UvData.Field.CoordMesh/ord>=5
     2512        UvData.Field.CoordMesh=5*ord;
     2513    elseif UvData.Field.CoordMesh/ord>=2
     2514        UvData.Field.CoordMesh=2*ord;
    25152515    else
    2516         UvData.Field.Mesh=ord;
     2516        UvData.Field.CoordMesh=ord;
    25172517    end
    25182518    % default projection plane
     
    25352535            delete_object(1);% delete the current projection object in the list UvData.Object, delete its graphic representations and update the list displayed in handles.ListObject and 2
    25362536            UvData.Object{1}.NbDim=NbDim;%test for 3D objects
    2537             UvData.Object{1}.RangeZ=UvData.Field.Mesh;%main plotting plane
     2537            UvData.Object{1}.RangeZ=UvData.Field.CoordMesh;%main plotting plane
    25382538            UvData.Object{1}.Coord(1,3)=(UvData.Field.ZMin+UvData.Field.ZMax)/2;%section at a middle plane chosen
    25392539            UvData.Object{1}.Angle=[0 0 0];
     
    26892689                [PlotType,PlotParamOut]=plot_field(ObjectData,haxes(imap),PlotParam{imap},PosColorbar{imap});
    26902690                write_plot_param(plot_handles{imap},PlotParamOut) %update the auto plot parameters
    2691                 if isfield(Field,'Mesh')&&~isempty(Field.Mesh)
    2692                     ObjectData.Mesh=Field.Mesh; % gives an estimated mesh size (useful for mouse action on the plot)
     2691                if isfield(Field,'CoordMesh')&&~isempty(Field.CoordMesh)
     2692                    ObjectData.CoordMesh=Field.CoordMesh; % gives an estimated mesh size (useful for mouse action on the plot)
    26932693                end
    26942694            end
     
    33633363        data.CoordType=UvData.CoordType;
    33643364    end
    3365     if isfield(UvData.Field,'Mesh')&~isempty(UvData.Field.Mesh)
     3365    if isfield(UvData.Field,'CoordMesh')&~isempty(UvData.Field.CoordMesh)
    33663366        data.RangeX=[UvData.Field.XMin UvData.Field.XMax];
    33673367        data.RangeY=[UvData.Field.YMin UvData.Field.YMax];
    3368         data.DX=UvData.Field.Mesh;
    3369         data.DY=UvData.Field.Mesh;
     3368        data.DX=UvData.Field.CoordMesh;
     3369        data.DY=UvData.Field.CoordMesh;
    33703370    elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image
    33713371        np=size(UvData.Field.A);
     
    45274527if isfield(UvData,'Field')
    45284528    Field=UvData.Field;
    4529     if isfield(UvData.Field,'Mesh')&&~isempty(UvData.Field.Mesh)
     4529    if isfield(UvData.Field,'CoordMesh')&&~isempty(UvData.Field.CoordMesh)
    45304530        data.RangeX=[UvData.Field.XMin UvData.Field.XMax];
    45314531        if strcmp(data.Type,'line')||strcmp(data.Type,'polyline')||strcmp(data.Type,'points')
    4532             data.RangeY=UvData.Field.Mesh;
     4532            data.RangeY=UvData.Field.CoordMesh;
    45334533        else
    45344534            data.RangeY=[UvData.Field.YMin UvData.Field.YMax];
    45354535        end
    4536         data.DX=UvData.Field.Mesh;
    4537         data.DY=UvData.Field.Mesh;
     4536        data.DX=UvData.Field.CoordMesh;
     4537        data.DY=UvData.Field.CoordMesh;
    45384538    end
    45394539    if isfield(Field,'NbDim')&& isequal(Field.NbDim,3)
Note: See TracChangeset for help on using the changeset viewer.