Changeset 3061


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

Added show region option

Location:
issm/trunk/src/m/classes/public/plot
Files:
3 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')
  • issm/trunk/src/m/classes/public/plot/plot_overlay.m

    r2830 r3061  
    9494
    9595%Select plot area
    96 %subplot(plotlines,plotcols,i);
     96subplot(plotlines,plotcols,i);
     97%uncomment following lines to have more space
    9798%P=get(gca,'pos');
    9899%P(3)=P(3)+0.05;
  • issm/trunk/src/m/classes/public/plot/plotdoc.m

    r3036 r3061  
    114114disp('       ''offset'': mesh offset used by ''rifts'', default is 500');
    115115disp('       ''scaleruler'': add a scale ruler, ''on'' for default value or [x0 y0 length width numberofticks] where (x0,y0) are the coordinates of the lower left corner');
     116disp('       ''showregion'': show domain in Antarctica on an inset, use ''insetpos'' properties');
    116117disp('       ''wrapping'': repeat ''n'' times the colormap (''n'' must be an integer)');
    117118disp('       ''unit'': by default, in m, otherwise, ''km'' is available');
Note: See TracChangeset for help on using the changeset viewer.