Changeset 8105
- Timestamp:
- 05/02/11 17:49:56 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/plot/plot_mesh.m
r5617 r8105 13 13 subplot(nlines,ncols,i); 14 14 15 %retrieve some options 16 linewidth=getfieldvalue(options,'meshlinewidth',1); 17 color=getfieldvalue(options,'meshcolor','black'); 18 15 19 %plot mesh 16 20 if is2d 17 21 A=elements(:,1); B=elements(:,2); C=elements(:,3); 18 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor', 'black');22 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor',color,'linewidth',linewidth); 19 23 else 20 24 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6); 21 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor', 'black');22 patch( 'Faces', [D E F], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor', 'black');23 patch( 'Faces', [A B E D],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor', 'black');24 patch( 'Faces', [B E F C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor', 'black');25 patch( 'Faces', [C A D F],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor', 'black');25 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor',color,'linewidth',linewidth); 26 patch( 'Faces', [D E F], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor',color,'linewidth',linewidth); 27 patch( 'Faces', [A B E D],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor',color,'linewidth',linewidth); 28 patch( 'Faces', [B E F C],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor',color,'linewidth',linewidth); 29 patch( 'Faces', [C A D F],'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor',color,'linewidth',linewidth); 26 30 end 27 31
Note:
See TracChangeset
for help on using the changeset viewer.