Changeset 3174


Ignore:
Timestamp:
03/03/10 16:44:35 (15 years ago)
Author:
Eric.Larour
Message:

Fixed some problems in overlay, that was not working in km mode.

Location:
issm/trunk/src/m/classes/public/plot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/plot/applyoptions.m

    r3152 r3174  
    264264        axes('pos',PosInset);
    265265        axis equal off
    266         box off
     266        %box off
    267267        if strcmpi(md.hemisphere,'n') | strcmpi(md.hemisphere,'north'),
    268268                A=expread([ ISSM_DIR '/../models/Greenland/Exp_Par/DomainOutline.exp']);
    269269        elseif strcmpi(md.hemisphere,'s') | strcmpi(md.hemisphere,'south'),
    270270                A=expread([ ISSM_DIR '/../models/Antarctica/Exp_Par/DomainOutline.exp']);
     271        else
     272                error('applyoptions error message: hemisphere not defined');
    271273        end
    272274        Ax=[min(A.x) max(A.x)];
     
    274276        mdx=[min(md.x) max(md.x)];
    275277        mdy=[min(md.y) max(md.y)];
    276         patch([Ax(1)  Ax(2)  Ax(2)  Ax(1)],[Ay(1)  Ay(1)  Ay(2)  Ay(2)],[1 1 1],'edgecolor','none')
    277278        line(A.x,A.y,'color','b');
     279        patch([Ax(1)  Ax(2)  Ax(2)  Ax(1) Ax(1)],[Ay(1)  Ay(1)  Ay(2)  Ay(2) Ay(1)],[1 1 1],'EdgeColor',[0 0 0],'LineWidth',1,'FaceLighting','none')
    278280        patch( [mdx(1) mdx(2) mdx(2) mdx(1)],[mdy(1) mdy(1) mdy(2) mdy(2)],ones(4,1),'EdgeColor',[0 0 0],'FaceColor',[0.5 0.5 0.5],'FaceAlpha',0.5)
    279281        colorbar('off');
  • issm/trunk/src/m/classes/public/plot/plot_overlay.m

    r3061 r3174  
    2020
    2121%get xlim and ylim
    22 xlim=getfieldvalue(options,'xlim',[min(md.x) max(md.x)]);
    23 ylim=getfieldvalue(options,'ylim',[min(md.y) max(md.y)]);
     22xlim=getfieldvalue(options,'xlim',[min(x) max(x)])/getfieldvalue(options,'unit',1);
     23ylim=getfieldvalue(options,'ylim',[min(y) max(y)])/getfieldvalue(options,'unit',1);
    2424
    2525%radar power
     
    3131        t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']);
    3232end
     33
     34
     35xlim=getfieldvalue(options,'xlim',[min(x) max(x)]);
     36ylim=getfieldvalue(options,'ylim',[min(y) max(y)]);
    3337
    3438%mesh2grid
     
    101105
    102106%Plot:
    103 imagesc(md.sarxm,md.sarym,image_rgb);set(gca,'YDir','normal');
     107imagesc(md.sarxm*getfieldvalue(options,'unit',1),md.sarym*getfieldvalue(options,'unit',1),image_rgb);set(gca,'YDir','normal');
    104108
    105109%last step: mesh overlay?
Note: See TracChangeset for help on using the changeset viewer.