clear all

filename0 = 'Fig06'  
 
load Fig06 z ant A
A_Boundary_DIIID;


%%

hh=figure(1);
hh.Position = [20 100 670 580];
set(gcf,'color','w');

%%
subplot(121)
plot(rlim24, zlim24,'k', rb1, zb1, 'r', 'linewidth',2)
hold on
plot(rlim, zlim, '--','color', [0,0.5,0], 'linewidth',2)
plot([2.213, 2.301],[0.52,0.28],'k', 'linewidth',7)
hold off
axis equal
set(gca, 'fontsize', 15);
set(gca, 'ylim', [-1.5,1.5], 'xlim', [0.95,2.4])
set(gca, 'position', [0.08, 0.12, 0.37, 0.8])
text(1.7, -0.85, 'LCFS', 'color', 'r', 'rotation', 35, 'fontsize', 15);
text(2.31,  0.40, 'Antenna', 'color', 'k', 'rotation', 90, 'fontsize', 15);
text(1.57,  -0.30, 'Simulation Domain', 'color', [0,0.5,0], 'rotation', 90, 'fontsize', 15);
xlabel('r (m)', 'fontsize', 20);
ylabel('z (m)', 'fontsize', 20);
title('(a) Antenna', 'fontsize', 22);


subplot(122) 
yyaxis left
plot(A, z, 'k')
set(gca, 'ylim',  [z(1), z(end)])
set(gca, 'fontsize', 15);
ylabel('z (m)', 'fontsize', 20);

yyaxis right
plot(A, ant*100, 'k', 'linewidth',2)
% set(gca, 'fontsize', 15);
set(gca, 'ylim', [ant(1)*100, ant(end)*100])
ylabel('Antenna surface (cm)', 'fontsize', 20);

%set(gca, 'fontsize', 15);
set(gca, 'position', [0.57, 0.12, 0.32, 0.8])
xlabel('amplitude (arbitrary unit)', 'fontsize', 20);
title('(b) Antenna Amplitude', 'fontsize', 22);

ax = gca;
ax.YAxis(1).Color = 'k';
ax.YAxis(2).Color = 'k';

saveas(gca, filename0,'epsc')
saveas(gca, filename0,'png')


 