Index: /issm/trunk/src/m/partition/part_hist.m
===================================================================
--- /issm/trunk/src/m/partition/part_hist.m	(revision 3007)
+++ /issm/trunk/src/m/partition/part_hist.m	(revision 3008)
@@ -1,11 +1,17 @@
 function []=part_hist(maptab,wgt);
 
-imin=min(maptab(:,2));
-imax=max(maptab(:,2));
+if (size(maptab,1) > size(maptab,2))
+    map=maptab(:,end);
+else
+    map=maptab(end,:)';
+end
+
+imin=min(map);
+imax=max(map);
 
 part=zeros(imax-imin+1,2);
 
 for i=imin:imax
-    ind=find(maptab(:,2) == i);
+    ind=find(map == i);
     part(i-imin+1,1)=length(ind);
     if exist('wgt','var')
@@ -20,10 +26,10 @@
 bar(imin:imax,part(:,1));
 xlim([imin imax])
-title('Number of Elements in Each Partition')
+title('Number of Nodes in Each Partition')
 
 subplot(2,1,2)
 bar(imin:imax,part(:,2));
 xlim([imin imax])
-title('Weight of Elements in Each Partition')
+title('Weight of Nodes in Each Partition')
 
 end
