%
%   tl_plot_title_alt.m  ver 1.0  by Tom Irvine
%
function[fig_num]=tl_plot_title_alt(fig_num,f,dB,stitle,fmin,fmax,fcr)
%
figure(fig_num);
%

[~,jj]=min(abs(f-fmax));

[~,ii]=min(abs(f-fcr));

hold on
plot(f,dB,'b');
plot(fcr,dB(ii),'ro');
legend('Transmission Loss','Critical Frequency','Location','northwest');
     

hold off;



title(stitle)
xlabel(' Center Frequency (Hz) ');
ylabel(' TL (dB) ');

ymin=0;
ymax=max(dB(1:jj));

for i=10:10:100
    if(ymax<i)
        ymax=i+10;
        break;
    end    

end 

%
[xtt,xTT,iflag]=xtick_label(fmin,fmax);

if(iflag==1)
    set(gca,'xtick',xtt);
    set(gca,'XTickLabel',xTT);
    fmin=min(xtt);
    fmax=max(xtt);    
end


%
set(gca,'GridLineStyle','-','MinorGridLineStyle',':','XScale','log','YScale','lin')
grid on;  
%
axis([fmin,fmax,ymin,ymax]);

fig_num=fig_num+1;
