Changeset 6631 for issm/trunk/src/m/model/plot/plot_section.m
- Timestamp:
- 11/22/10 15:49:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/plot/plot_section.m
r6563 r6631 3 3 % 4 4 % Usage: 5 % plot_section(md, options,width,i);5 % plot_section(md,data,options,nlines,ncols,i) 6 6 % 7 7 % See also: PLOTMODEL … … 11 11 12 12 %Compute the indexes of the 2 plots (one for the sectionvalue and one for showsection 13 upperplots=f ix((i-1)/width);14 if upperplots==0, leftplots=i-1; else leftplots=i- width*upperplots-1; end15 index1=4* width*upperplots+2*leftplots+1;13 upperplots=floor((i-1)/ncols); 14 if upperplots==0, leftplots=i-1; else leftplots=i-ncols*upperplots-1; end 15 index1=4*ncols*upperplots+2*leftplots+1; 16 16 index2=index1+1; 17 width=2*width;17 ncols=2*ncols; 18 18 else 19 19 index1=i; … … 78 78 79 79 %plot section only with labels 80 subplot( width,width,index2)80 subplot(nlines,ncols,index2) 81 81 plot_unit(x_m,y_m,z_m,elements_m,data(:,i),is2d,datatype,options) 82 82 hold on … … 126 126 127 127 %plot section only with labels 128 subplot( width,width,index2)128 subplot(nlines,ncols,index2) 129 129 plot_unit(x_m,y_m,z_m,elements_m,data(:,i),is2d,datatype,options) 130 130 hold on … … 139 139 end 140 140 141 subplot( width,width,index1)141 subplot(nlines,ncols,index1) 142 142 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); 143 143 patch( 'Faces', [A B C D], 'Vertices', [s z zeros(length(s),1)],'FaceVertexCData',data_s,'FaceColor','interp','EdgeColor','none'); … … 161 161 162 162 %plot section only with labels 163 subplot( width,width,index2)163 subplot(nlines,ncols,index2) 164 164 plot_unit(x_m,y_m,z_m,elements_m,data,is2d,datatype,options) 165 165 hold on … … 174 174 end 175 175 176 subplot( width,width,index1)176 subplot(nlines,ncols,index1) 177 177 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); 178 178 patch( 'Faces', [A B C D], 'Vertices', [x y z],'FaceVertexCData',data_s,'FaceColor','interp','EdgeColor','none');
Note:
See TracChangeset
for help on using the changeset viewer.