Changeset 7142
- Timestamp:
- 01/23/11 11:39:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/plot/applyoptions.m
r7055 r7142 89 89 %Basinzoom 90 90 if exist(options,'basin'); 91 basinzoom(getfieldvalue(options,'basin'),getfieldvalue(options,'unit',1)); 92 end 91 if strcmpi(md.hemisphere,'n'), hemisphere=+1; else hemisphere=-1; end 92 basinzoom('basin',getfieldvalue(options,'basin'),'hemisphere',getfieldvalue(options,'hemisphere',hemisphere),'basindeltax',getfieldvalue(options,'basindeltax',300000),'basindeltay',getfieldvalue(options,'basindeltay',300000),'unit',getfieldvalue(options,'unit',1)); 93 end 94 95 %ShowBasins 96 if strcmpi(getfieldvalue(options,'showbasins','off'),'on') 97 if strcmpi(md.hemisphere,'n'), hemisphere=+1; else hemisphere=-1; end 98 showbasins('hemisphere',getfieldvalue(options,'hemisphere',hemisphere),'fontsize',fontsize); 99 end 100 93 101 94 102 %Caxis … … 202 210 end 203 211 if exist(options,'colorbartitle'), 204 set(get(c,'title'),' String',getfieldvalue(options,'colorbartitle'),'Color',getfieldvalue(options,'FontColor','k'));212 set(get(c,'title'),'FontSize',getfieldvalue(options,'colorbarfontsize',fontsize),'String',getfieldvalue(options,'colorbartitle'),'Color',getfieldvalue(options,'FontColor','k')); 205 213 end 206 214 if exist(options,'colorbarwidth'), … … 356 364 %if we are zooming on a basin, don't take the mesh for the boundaries! 357 365 if exist(options,'basin'), 358 [mdx mdy]=basinzoom(getfieldvalue(options,'basin')); 359 else 360 mdx=[min(md.x) max(md.x)]; 361 mdy=[min(md.y) max(md.y)]; 362 end 363 line(A.x,A.y,'color','b'); 364 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') 365 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) 366 colorbar('off'); 366 if strcmpi(md.hemisphere,'n'), hemisphere=+1; else hemisphere=-1; end 367 [mdx mdy]=basinzoom('basin',getfieldvalue(options,'basin'),'hemisphere',getfieldvalue(options,'hemisphere',hemisphere),'basindeltax',getfieldvalue(options,'basindeltax',300000),'basindeltay',getfieldvalue(options,'basindeltay',300000),'unit',getfieldvalue(options,'unit',1)); 368 else 369 mdx=[min(md.x) max(md.x)]; 370 mdy=[min(md.y) max(md.y)]; 371 end 372 line(A.x,A.y,'color','b'); 373 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') 374 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) 375 colorbar('off'); 367 376 end 368 377 369 378 %flag edges of a partition 370 379 if exist(options,'partitionedges') 371 372 373 374 375 376 377 378 379 380 [xsegments ysegments]=flagedges(md.elements,md.x,md.y,md.part); 381 xsegments=xsegments*getfieldvalue(options,'unit',1); 382 ysegments=ysegments*getfieldvalue(options,'unit',1); 383 color=getfieldvalue(options,'partitionedgescolor','r-'); 384 linewidth=getfieldvalue(options,'linewidth',1); 385 hold on; 386 for i=1:length(xsegments), 387 plot(xsegments(i,:),ysegments(i,:),color,'LineWidth',linewidth); 388 end 380 389 end 381 390
Note:
See TracChangeset
for help on using the changeset viewer.