Changeset 18251
- Timestamp:
- 07/16/14 16:09:57 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/plot_elementstype.m
r18076 r18251 17 17 subplot(width,width,i); 18 18 19 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options); 20 return; 19 21 if is2d 20 %None elements21 22 posNONE=find(data==0); 22 23 A=elements(posNONE,1); B=elements(posNONE,2); C=elements(posNONE,3); 23 24 p1=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',0,'FaceColor','flat','EdgeColor',edgecolor); 24 %SIA elements25 25 posH=find(data==1); 26 26 A=elements(posH,1); B=elements(posH,2); C=elements(posH,3); 27 27 p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',1,'FaceColor','flat','EdgeColor',edgecolor); 28 %SSA element29 28 posM=find(data==2); 30 29 A=elements(posM,1); B=elements(posM,2); C=elements(posM,3); 31 p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',2,'FaceColor','flat','EdgeColor',edgecolor);32 %L1L2 element33 30 posM=find(data==3); 34 31 A=elements(posM,1); B=elements(posM,2); C=elements(posM,3); 35 32 p4=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',2,'FaceColor','flat','EdgeColor',edgecolor); 36 %HO element37 33 posP=find(data==4); 38 34 A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); 39 35 p5=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',3,'FaceColor','flat','EdgeColor',edgecolor); 40 %FS elements41 36 posS=find(data==5); 42 37 A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); 43 38 p6=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',4,'FaceColor','flat','EdgeColor',edgecolor); 44 %SSAHO element45 39 posMP=find(data==6); 46 40 A=elements(posMP,1); B=elements(posMP,2); C=elements(posMP,3); 47 41 p7=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',5,'FaceColor','flat','EdgeColor',edgecolor); 48 %HOFS elements49 42 posPS=find(data==7); 50 43 A=elements(posPS,1); B=elements(posPS,2); C=elements(posPS,3); 51 44 p8=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',7,'FaceColor','flat','EdgeColor',edgecolor); 52 %SSAFS elements53 45 posMS=find(data==8); 54 46 A=elements(posMS,1); B=elements(posMS,2); C=elements(posMS,3); 55 47 p9=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',6,'FaceColor','flat','EdgeColor',edgecolor); 56 57 48 else 58 %None elements59 49 PosNONE=find(data==0); 60 50 A=elements(PosNONE,1); B=elements(PosNONE,2); C=elements(PosNONE,3); D=elements(PosNONE,4); E=elements(PosNONE,5); F=elements(PosNONE,6); … … 64 54 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 0,'FaceColor','flat','EdgeColor',edgecolor); 65 55 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 0,'FaceColor','flat','EdgeColor',edgecolor); 66 %SIA elements67 56 posH=find(data==1); 68 57 A=elements(posH,1); B=elements(posH,2); C=elements(posH,3); D=elements(posH,4); E=elements(posH,5); F=elements(posH,6); … … 72 61 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 1,'FaceColor','flat','EdgeColor',edgecolor); 73 62 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 1,'FaceColor','flat','EdgeColor',edgecolor); 74 %SSA elements75 63 posM=find(data==2); 76 64 A=elements(posM,1); B=elements(posM,2); C=elements(posM,3); D=elements(posM,4); E=elements(posM,5); F=elements(posM,6); … … 80 68 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor); 81 69 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor); 82 %L1L2 elements83 70 posP=find(data==3); 84 71 A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6); … … 88 75 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor); 89 76 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor); 90 %HO elements91 77 posP=find(data==3); 92 78 A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6); … … 96 82 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor); 97 83 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor); 98 %FS elements99 84 posS=find(data==4); 100 85 A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); D=elements(posS,4); E=elements(posS,5); F=elements(posS,6); … … 104 89 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor); 105 90 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor); 106 %SSAHO elements107 91 posP=find(data==5); 108 92 A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6); … … 120 104 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor); 121 105 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor); 122 %SSAFS elements123 106 PosMS=find(data==6); 124 107 A=elements(PosMS,1); B=elements(PosMS,2); C=elements(PosMS,3); D=elements(PosMS,4); E=elements(PosMS,5); F=elements(PosMS,6);
Note:
See TracChangeset
for help on using the changeset viewer.