% OscillatorI6b
% This program plots the Lorentz(ian) function for positive values in X in a
% loglog plot
% Where A_D^2 is the Eq. I.28 in the text
% Y = 4*A_D^2*\gamma^2/\omega_r^2
% X = (\omega-\omega_r)^2/\gamma^2
X = .01:.0001:100;
Y = 1./(X.^2+1);
close all   %this clears previous figures
loglog(X,Y,'linewidth',3,'color','r')
grid on
set(gca,'fontname','Times New Roman','fontsize',20);
set(gca,'LineWidth',1.5,'TickLength',[0.03 0.025]);
xlabel('$(\omega-\rm\omega_r)/\gamma$','Interpreter','LaTeX','fontname','Times New Roman','fontsize',20)
ylabel ('4\it A\rm_D^2 \gamma^2/\omega_r^2','fontname','Times New Roman','fontsize',20)
xlim([0.01 100]) %define limits for x axis
ylim([0.0001 10]) %define limits for y axis
set(gcf, 'WindowStyle', 'normal');
set(gca, 'Unit', 'inches');
set(gca, 'TickLabelInterpreter','LaTeX',...
     'XTick',[0.01 0.1 1 10 100])

set(gcf, 'PaperPosition',1.9*[0 0 4 3],'PaperSize',1.9*[4 3]) %define the paper size and position
% % annotation('doublearrow',[.48 .555],[.48 .48])
% % text(-.5,0.45,'2\gamma','fontname','Times New Roman','fontsize',20)
saveas(gcf,'6b.pdf','pdf') %save file as a .pdf file