Ignore:
Timestamp:
02/20/10 15:07:42 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added show region option

File:
1 edited

Legend:

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

    r3036 r3061  
    66%
    77%   See also: PLOTMODEL, PARSE_OPTIONS
     8
     9global ISSM_DIR
    810
    911%fontsize
     
    251253end
    252254
     255%showregion
     256if strcmpi(getfieldvalue(options,'showregion','off'),'on'),
     257        %get inset relative position (x,y,width,height)
     258        insetpos=getfieldvalue(options,'insetpos',[0.02 0.70 0.18 0.18]);
     259        %get current plos position
     260        cplotpos=get(gca,'pos');
     261        %compute inset position
     262        PosInset=[cplotpos(1)+insetpos(1)*cplotpos(3),cplotpos(2)+insetpos(2)*cplotpos(4), insetpos(3)*cplotpos(3), insetpos(4)*cplotpos(4)];
     263        axes('pos',PosInset);
     264        axis equal off
     265        box off
     266        A=expread([ ISSM_DIR '/../models/Antarctica/Exp_Par/DomainOutline.exp']);
     267        Ax=[min(A.x) max(A.x)];
     268        Ay=[min(A.y) max(A.y)];
     269        mdx=[min(md.x) max(md.x)];
     270        mdy=[min(md.y) max(md.y)];
     271        patch([Ax(1)  Ax(2)  Ax(2)  Ax(1)],[Ay(1)  Ay(1)  Ay(2)  Ay(2)],[1 1 1],'edgecolor','none')
     272        line(A.x,A.y,'color','b');
     273        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)
     274        colorbar('off');
     275end
    253276%flag edges of a partition
    254277if exist(options,'partitionedges')
Note: See TracChangeset for help on using the changeset viewer.