Changeset 7098
- Timestamp:
- 01/14/11 10:33:36 (14 years ago)
- Location:
- issm/trunk/src/m/model/plot
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/plot/plot_unit.m
r6976 r7098 19 19 case 1, 20 20 21 pos=find(~isnan(data)); %needed f pr element on water21 pos=find(~isnan(data)); %needed for element on water 22 22 if is2d, 23 23 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); … … 56 56 end 57 57 58 %Patch plot 58 %Patch plot P1 59 59 case 4, 60 60 … … 70 70 end 71 71 72 %Patch plot P0 73 case 5, 74 75 if is2d, 76 A=elements(:,1); B=elements(:,2); C=elements(:,3); 77 h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(:),'FaceColor','flat','EdgeColor',edgecolor); 78 else 79 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6); 80 h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor); 81 patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor); 82 patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor); 83 patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor); 84 patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor); 85 end 86 72 87 otherwise, 73 88 error(['case ' num2str(datatype) ' not supported']); -
issm/trunk/src/m/model/plot/processdata.m
r7081 r7098 20 20 if isstruct(data) 21 21 if (isfield(data,'index') & isfield(data,'value')), 22 data=data.value; 23 if size(data,2)==1, 24 data=repmat(data,1,3); 22 if data.interpolation(1)==P1Enum(), 23 data=data.value; 24 data=data'; 25 data=data(:); 26 datatype=4; 27 elseif data.interpolation(1)==P0Enum(), 28 data=data.value; 29 datatype=5; 30 else 31 error(['interpolation ' data.interpolation(1) ' not supported yet']); 25 32 end 26 data=data';27 data=data(:);28 datatype=4;29 33 else 30 34 error('structure other than Patch not supported yet'); … … 39 43 40 44 %non patch processing 41 if datatype~=4 ,45 if datatype~=4 & datatype~=5, 42 46 43 47 %transpose data if necessary … … 110 114 111 115 %Initialize datatype if non patch 112 if datatype~=4 ,116 if datatype~=4 & datatype~=5, 113 117 datatype=1; 114 118 end
Note:
See TracChangeset
for help on using the changeset viewer.