bar(frequency,values,0.2,'yellow','stacked') //bar plot
clf();
//next few lines plot hisotgram
num_intervals=20;
[numvillages,a] = size(values); 
max_val = max(values); min_val=min(values); bin_size=(max_val-min_val)/num_intervals;
bins=zeros(1,num_intervals); 
for i=1:numvillages 
	bin_no=min(floor((values(i)-min_val)/bin_size)+1,num_intervals); 
	//disp(bin_no); 
	bins(bin_no)=bins(bin_no)+1; 
end;
bar([1:num_intervals],bins,1,'yellow','stacked') //histogram in terms of bar plot
