Changeset 25587


Ignore:
Timestamp:
09/20/20 16:36:58 (4 years ago)
Author:
Eric.Larour
Message:

CHG: diverse

Location:
issm/branches/trunk-larour-SLPS2020/src/m/plot
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-SLPS2020/src/m/plot/plot_coastlines.m

    r25325 r25587  
    22
    33%define coastline: {{{
    4 coast=[-83.83 -180 ;...
     4coast=[-90 -180; ...
     5        -83.83 -180 ;...
    56-84.33 -178 ;...
    67-84.5 -174 ;...
     
    614615-83.5 176 ;...
    615616-83.83 180 ;...
     617-85 180 ;...
     618-87 180 ;...
     619-90 180 ;...
    616620NaN NaN ;...
    617621-77.58 166.33 ;...
     
    9866987019.77 -156.05 ;...
    9867987119.95 -155.87 ;...
    9868 20.27 -155.88 ];
     987220.27 -155.88 ;...
     9873NaN NaN];
    98699874
    9870 coastlat=coast(:,1);
    9871 coastlon=coast(:,2);
     9875coastlat=[coast(:,1); coast(:,1)];
     9876coastlon=[coast(:,2); coast(:,2)-360];
    98729877
    98739878%}}}
     
    99029907                p=polyshape(coastlon,coastlat);
    99039908                plot(p,'FaceColor','w','FaceAlpha',1);
     9909                if strcmpi(getfieldvalue(options,'coordcent','atlantic'),'pacific'),
     9910                        xlim(getfieldvalue(options,'xlim',[-360 0]));
     9911                else
     9912                        xlim(getfieldvalue(options,'xlim',[-180 180]));
     9913                end
    99049914                %p=plot(coastlon,coastlat,'k-');
    99059915        end
  • issm/branches/trunk-larour-SLPS2020/src/m/plot/processdata.m

    r23912 r25587  
    4242end
    4343
     44%special case for coord latlong:
     45if strcmpi(getfieldvalue(options,'coord','xy'),'latlon') | strcmpi(getfieldvalue(options,'coord','xy'),'latlong'),
     46        [data datatype] = processdatalatlong(md,data,options);
     47        return;
     48end
     49
    4450%needed later on
    4551if isprop(md.mesh,'numberofvertices2d'),
  • issm/branches/trunk-larour-SLPS2020/src/m/plot/processmesh.m

    r25163 r25587  
    2424if strcmp(domaintype(md.mesh),'3Dsurface'),
    2525        [x y z elements is2d isplanet] = processmesh(md.mesh,options);
    26         if strcmpi(getfieldvalue(options,'coord','xy'),'latlon'),
    27                 x=md.mesh.long;
    28                 y=md.mesh.lat;
     26        if strcmpi(getfieldvalue(options,'coord','xy'),'latlon') | strcmpi(getfieldvalue(options,'coord','xy'),'latlong'),
     27                x0=md.mesh.long;
     28                y0=md.mesh.lat;
     29                %add row at lat=90 and lat=-90
     30                add=[(-180:.1:-1e-5)';(1e-5:.1:180)'];
     31                nadd=length(add);
     32                xextra=[add;add];
     33                yextra=[90*ones(nadd,1); -90*ones(nadd,1)];
     34                x=[x0;xextra];
     35                y=[y0;yextra];
     36
     37                if strcmpi(getfieldvalue(options,'coordcent','atlantic'),'pacific'),
     38                        pos=find(x>0);  x(pos)=-360+x(pos);
     39                end
    2940                elements=delaunay(x,y);
    30                 z=md.mesh.lat; z(:)=0;
     41                z=x; z(:)=0;
    3142        end
    3243        return;
     
    4253else
    4354        elements=md.mesh.elements;
    44         if ~strcmpi(getfieldvalue(options,'coord','xy'),'latlon') ,
     55        if ~strcmpi(getfieldvalue(options,'coord','xy'),'latlon') &  ~strcmpi(getfieldvalue(options,'coord','xy'),'latlong') ,
    4556                x=md.mesh.x;
    4657                if isprop(md.mesh,'x2d'), x2d=md.mesh.x2d; end
     
    5061                x=md.mesh.long;
    5162                y=md.mesh.lat;
     63                if strcmpi(getfieldvalue(options,'coordcent','atlantic'),'pacific'),
     64                        pos=find(x>0);  x(pos)-360+x(pos);
     65                end
    5266        end
    5367end
  • issm/branches/trunk-larour-SLPS2020/src/m/plot/subplotmodel.m

    r23108 r25587  
    2525ymin   = 1-vmargin(2)-height;
    2626
     27box=getfieldvalue(options,'box','off');
     28if strcmpi(box,'on'),
     29        visible='on';
     30else
     31        visible='off';
     32end
     33
    2734for i = 1:nlines
    2835        xmin = hmargin(1);
     
    3037                if(((i-1)*ncols+j)==num)
    3138                        ha = axes('Units','normalized', ...
    32                                 'Position',[xmin ymin width height],'XTickLabel','','YTickLabel','','Visible','off');
     39                                'Position',[xmin ymin width height],'XTickLabel','','YTickLabel','',...
     40                                'Visible',visible,'box',box);
    3341                        return
    3442                end
Note: See TracChangeset for help on using the changeset viewer.