Changeset 25587
- Timestamp:
- 09/20/20 16:36:58 (4 years ago)
- 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 2 2 3 3 %define coastline: {{{ 4 coast=[-83.83 -180 ;... 4 coast=[-90 -180; ... 5 -83.83 -180 ;... 5 6 -84.33 -178 ;... 6 7 -84.5 -174 ;... … … 614 615 -83.5 176 ;... 615 616 -83.83 180 ;... 617 -85 180 ;... 618 -87 180 ;... 619 -90 180 ;... 616 620 NaN NaN ;... 617 621 -77.58 166.33 ;... … … 9866 9870 19.77 -156.05 ;... 9867 9871 19.95 -155.87 ;... 9868 20.27 -155.88 ]; 9872 20.27 -155.88 ;... 9873 NaN NaN]; 9869 9874 9870 coastlat= coast(:,1);9871 coastlon= coast(:,2);9875 coastlat=[coast(:,1); coast(:,1)]; 9876 coastlon=[coast(:,2); coast(:,2)-360]; 9872 9877 9873 9878 %}}} … … 9902 9907 p=polyshape(coastlon,coastlat); 9903 9908 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 9904 9914 %p=plot(coastlon,coastlat,'k-'); 9905 9915 end -
issm/branches/trunk-larour-SLPS2020/src/m/plot/processdata.m
r23912 r25587 42 42 end 43 43 44 %special case for coord latlong: 45 if strcmpi(getfieldvalue(options,'coord','xy'),'latlon') | strcmpi(getfieldvalue(options,'coord','xy'),'latlong'), 46 [data datatype] = processdatalatlong(md,data,options); 47 return; 48 end 49 44 50 %needed later on 45 51 if isprop(md.mesh,'numberofvertices2d'), -
issm/branches/trunk-larour-SLPS2020/src/m/plot/processmesh.m
r25163 r25587 24 24 if strcmp(domaintype(md.mesh),'3Dsurface'), 25 25 [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 29 40 elements=delaunay(x,y); 30 z= md.mesh.lat; z(:)=0;41 z=x; z(:)=0; 31 42 end 32 43 return; … … 42 53 else 43 54 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') , 45 56 x=md.mesh.x; 46 57 if isprop(md.mesh,'x2d'), x2d=md.mesh.x2d; end … … 50 61 x=md.mesh.long; 51 62 y=md.mesh.lat; 63 if strcmpi(getfieldvalue(options,'coordcent','atlantic'),'pacific'), 64 pos=find(x>0); x(pos)-360+x(pos); 65 end 52 66 end 53 67 end -
issm/branches/trunk-larour-SLPS2020/src/m/plot/subplotmodel.m
r23108 r25587 25 25 ymin = 1-vmargin(2)-height; 26 26 27 box=getfieldvalue(options,'box','off'); 28 if strcmpi(box,'on'), 29 visible='on'; 30 else 31 visible='off'; 32 end 33 27 34 for i = 1:nlines 28 35 xmin = hmargin(1); … … 30 37 if(((i-1)*ncols+j)==num) 31 38 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); 33 41 return 34 42 end
Note:
See TracChangeset
for help on using the changeset viewer.