source: issm/branches/trunk-jpl-damage/src/m/model/plot/plot_parthistn.m@ 12194

Last change on this file since 12194 was 9650, checked in by Mathieu Morlighem, 14 years ago

Added qmu object

File size: 1.2 KB
Line 
1function plot_parthist(md,options,nlines,ncols,i);
2%PLOT_PARTHIST - plot partitioning histogram
3%
4% Usage:
5% plot_parthist(md,options,nlines,ncols,i);
6%
7% See also: PLOTMODEL
8
9%process data and model
10[x y z elements is2d isplanet]=processmesh(md,[],options);
11
12%plot mesh
13subplot(nlines,ncols,i);
14
15imin=min(md.qmu.partition);
16imax=max(md.qmu.partition);
17
18part=zeros(imax-imin+1,2);
19
20for i=imin:imax
21 ind=find(md.qmu.partition == i);
22 part(i-imin+1,1)=length(ind);
23 part(i-imin+1,2)=sum(md.vertex_weight(ind));
24end
25
26%subplot(2,1,1)
27bar(imin:imax,part(:,1));
28%xlim([imin-0.5 imax+0.5])
29%title('Number of Nodes in Each Partition')
30options=addfielddefault(options,'xlim',[imin-0.5 imax+0.5]);
31options=addfielddefault(options,'title','Number of Nodes in Each Partition');
32options=addfielddefault(options,'colorbar','off');
33
34%subplot(2,1,2)
35%bar(imin:imax,part(:,2));
36%xlim([imin-0.5 imax+0.5])
37%title('Total Weight in Each Partition')
38%options=addfielddefault(options,'xlim',[imin-0.5 imax+0.5]);
39%options=addfielddefault(options,'title','Total Weight in Each Partition');
40%options=addfielddefault(options,'colorbar','off');
41
42%apply options
43applyoptions(md,[],options);
Note: See TracBrowser for help on using the repository browser.