Changeset 46 for trunk/src/plot_field.m


Ignore:
Timestamp:
Mar 15, 2010, 5:42:11 PM (14 years ago)
Author:
gostiaux
Message:

various bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r42 r46  
    137137    hfig=figure;
    138138    if isfield(Data,'IndexObj')&isfield(Data,'Style')&isfield(Data,'ProjMode')
    139         figname=[num2str(Data.IndexObj) '-' set_title(Data.Style,Data.ProjMode)];
     139        figname=[num2str(Data.IndexObj) '-' Data.Style];
    140140        set(hfig,'Name',figname)
    141141    end
     
    10161016        test_lim=0;
    10171017        if test_vec
    1018             'TESTplot'
    1019             Xlim=[min(vec_X) max(vec_X)]
    1020             Ylim=[min(vec_Y) max(vec_Y)]
     1018            Xlim=[min(vec_X) max(vec_X)];
     1019            Ylim=[min(vec_Y) max(vec_Y)];
    10211020            test_lim=1;
    10221021            if test_ima%both background image and vectors coexist, take the wider bound
     
    10331032            test_lim=1;
    10341033        end
    1035         if test_lim
    1036             set(haxes,'XLim',Xlim);% set x limits of frame in axes coordinates
    1037             set(haxes,'YLim',Ylim);% set y limits of frame in axes coordinate
     1034        if test_lim
     1035            if Xlim(2)>Xlim(1)
     1036                set(haxes,'XLim',Xlim);% set x limits of frame in axes coordinates
     1037            end
     1038            if Ylim(2)>Ylim(1)
     1039                set(haxes,'YLim',Ylim);% set y limits of frame in axes coordinate
     1040            end
    10381041        end
    10391042end
Note: See TracChangeset for help on using the changeset viewer.