
function[fig_num]=plot_modal_density(fig_num,stitle,fc,mph,fmin,fmax)
%
%   idx = first band above which all bands have a least three modes
%
                figure(fig_num)
                fig_num=fig_num+1;

                plot(fc,mph);

                title(stitle);
               
                xlabel('Frequency (Hz)');
                ylabel('Modal Density (modes/Hz)');
                
                [xtt,xTT,iflag]=xtick_label(fmin,fmax);
            
                if(iflag==1)
                    set(gca,'xtick',xtt);
                    set(gca,'XTickLabel',xTT);
                end    
               
                xlim([fmin,fmax]);
                
                
                ya=get(gca,'YLim');
                
                ya=max(ya);
                
                mm=max(mph);
                
                if(mm<1)
                    ya=1;
                end
                if(mm<0.5)
                    ya=0.5; 
                end   
                if(mm<0.2)
                    ya=0.2;
                end    
                if(mm<0.1)
                    ya=0.1;
                end    
                if(mm<0.05)
                    ya=0.05;
                end   
                if(mm<0.02)
                    ya=0.02;
                end     
                if(mm<0.01)
                    ya=0.01;
                end     
                
                ylim([0,ya]);
                
                 
                set(gca,'XGrid','on','GridLineStyle',':');
                set(gca,'YGrid','on','GridLineStyle',':');    
                
                set(gca,'MinorGridLineStyle',':','GridLineStyle','-','XScale','log',...
                                 'YScale','lin','XminorTick','off','YminorTick','off'); 

          