Changeset 12307
- Timestamp:
- 05/31/12 13:22:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/model/plot/applyoptions.m
r12166 r12307 292 292 textpositioni=textposition{i}; 293 293 textrotationi=textrotation{i}; 294 h=text(textpositioni(1),textpositioni(2), textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi);294 h=text(textpositioni(1),textpositioni(2),10,textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi); 295 295 set(h,'Clipping','on'); %prevent text from appearing outside of the box 296 296 end … … 349 349 if exist(options,'axispos'), 350 350 Axis=getfieldvalue(options,'axispos'); 351 hold on 351 352 set(gca,'pos',Axis); 352 353 end … … 414 415 %box off 415 416 if strcmpi(md.mesh.hemisphere,'n') | strcmpi(md.mesh.hemisphere,'north'), 416 A=expread([ issmdir() '/projects/Exp/GreenlandBoxFront.exp']);417 A=expread([ jplsvn() '/projects/Exp/GreenlandBoxFront.exp']); 417 418 [A.x A.y]=ll2xy(A.x,A.y,+1,45,70); 419 A.x = A.x(1:30:end); 420 A.y = A.y(1:30:end); 418 421 elseif strcmpi(md.mesh.hemisphere,'s') | strcmpi(md.mesh.hemisphere,'south'), 419 A=expread([ issmdir() '/projects/Exp/Antarctica.exp']);422 A=expread([ jplsvn() '/projects/Exp/Antarctica.exp']); 420 423 else 421 424 error('applyoptions error message: hemisphere not defined'); 422 425 end 423 Ax=[min(A.x) max(A.x)]; 424 Ay=[min(A.y) max(A.y)]; 426 offset=3*10^4; 427 Ax=[min(A.x)-offset max(A.x)+offset]; 428 Ay=[min(A.y)-offset max(A.y)+offset]; 425 429 %if we are zooming on a basin, don't take the mesh for the boundaries! 426 430 if exist(options,'basin'), 427 431 [mdx mdy]=basinzoom(options); 428 432 else 429 offset=3*10^4;430 433 mdx=[min(md.mesh.x)-offset max(md.mesh.x)+offset]; 431 434 mdy=[min(md.mesh.y)-offset max(md.mesh.y)+offset]; … … 433 436 line(A.x,A.y,ones(size(A.x)),'color','b'); 434 437 patch([Ax(1) Ax(2) Ax(2) Ax(1) Ax(1)],[Ay(1) Ay(1) Ay(2) Ay(2) Ay(1)],[1 1 1],'EdgeColor',[0 0 0],'LineWidth',1,'FaceLighting','none') 435 patch( 438 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','r','FaceAlpha',0.5) 436 439 colorbar('off'); 437 440 %back to main gca … … 441 444 %flag edges of a partition 442 445 if exist(options,'partitionedges') 443 [xsegments ysegments]=flagedges(md.mesh.elements,md.mesh.x,md.mesh.y,md.qmu.partition); 444 xsegments=xsegments*getfieldvalue(options,'unit',1); 445 ysegments=ysegments*getfieldvalue(options,'unit',1); 446 color=getfieldvalue(options,'partitionedgescolor','r-'); 447 linewidth=getfieldvalue(options,'linewidth',1); 448 hold on; 449 for i=1:length(xsegments), 450 plot(xsegments(i,:),ysegments(i,:),color,'LineWidth',linewidth); 451 end 446 [xsegments ysegments]=flagedges(md.mesh.elements,md.mesh.x,md.mesh.y,md.qmu.partition); 447 xsegments=xsegments*getfieldvalue(options,'unit',1); 448 ysegments=ysegments*getfieldvalue(options,'unit',1); 449 color=getfieldvalue(options,'partitionedgescolor','r-'); 450 linewidth=getfieldvalue(options,'linewidth',1); 451 hold on; 452 for i=1:length(xsegments), 453 plot(xsegments(i,:),ysegments(i,:),color,'LineWidth',linewidth); 454 end 455 end 456 457 %Scatter 458 if exist(options,'scatter') 459 data=getfieldvalue(options,'scatter'); 460 hold on 461 plot_scatter(data(:,1),data(:,2),getfieldvalue(options,'scattersize',3),data(:,3)); 452 462 end 453 463
Note:
See TracChangeset
for help on using the changeset viewer.