Changeset 18997


Ignore:
Timestamp:
01/08/15 11:21:28 (10 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added patch option to expdisp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/exp/expdisp.m

    r18660 r18997  
    1313%      - 'multiplier' : coordinate multiplier (10^3 if the plot is in km)
    1414%      - 'title'      : do we add contour names to each contour
     15%      - 'patch'      : do we want the contour to be filled
    1516%
    1617%   Example:
     
    2425linewidth      = getfieldvalue(options,'linewidth',1);
    2526linestyle      = getfieldvalue(options,'linestyle','-r');
     27ispatch        = getfieldvalue(options,'patch',0);
    2628
    2729%read file
     
    3739        if domain(i).nods==1
    3840                plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'o','MarkerEdgeColor','k','MarkerFaceColor','r','MarkerSize',10);
    39           if exist(options,'title')
     41                if exist(options,'title')
    4042                        text(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,domain(i).name,'BackgroundColor',[1. .0 .0]);
    41           end
     43                end
    4244        else
    43                 if (isnumeric(linestyle))
    44                         plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'Color',linestyle,'linewidth',linewidth);
     45                if ispatch,
     46                        patch(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,linestyle);
    4547                else
    46                         plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,linestyle,'linewidth',linewidth);
    47           end
    48           if exist(options,'title')
    49                   text(domain(i).x(1)*unitmultiplier,domain(i).y(1)*unitmultiplier,domain(i).name,'BackgroundColor',[.7 .9 .7]);
    50           end
    51   end
     48                        if (isnumeric(linestyle))
     49                                plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'Color',linestyle,'linewidth',linewidth);
     50                        else
     51                                plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,linestyle,'linewidth',linewidth);
     52                        end
     53                end
     54                if exist(options,'title')
     55                        text(domain(i).x(1)*unitmultiplier,domain(i).y(1)*unitmultiplier,domain(i).name,'BackgroundColor',[.7 .9 .7]);
     56                end
     57        end
    5258end
    53 
Note: See TracChangeset for help on using the changeset viewer.