%% Dipping anisotropy
% aD = [0 30 60 90] °

% f1=load('ano5-20-5aD0.mat','data');
% f2=load('ano5-20-5aD30.mat','data');
% f3=load('ano5-20-5aD60.mat','data'); 
% f4=load('ano5-20-5aD90.mat','data');
% load('ano5-20-5aD0.mat','rec');
% load('ano5-20-5aD0.mat','freq');
f1.data =readtable('data-ano5-20-5aD0.csv');
f2.data=readtable('data-ano5-20-5aD30.csv');
f3.data=readtable('data-ano5-20-5aD60.csv');
f4.data=readtable('data-ano5-20-5aD90.csv');

load rec.dat
freq = unique(f1.data.Frequency);

%

comp={'rhoXY';'rhoYX';'rhoXX';'rhoYY';'phaXY';'phaYX'};
% comp={'Tzx';'Tzy'};
F =@abs;

for i =1:size(comp,1)
   fig=figure;
   tiledlayout(1,4,'TileSpacing','compact');
   nexttile
   Mapdata_xyplane(f1.data,rec,cell2mat(comp(i)),F,'')
   nexttile

   Mapdata_xyplane(f2.data,rec,cell2mat(comp(i)),F,'')
   nexttile
   Mapdata_xyplane(f3.data,rec,cell2mat(comp(i)),F,'')
   nexttile
   Mapdata_xyplane(f4.data,rec,cell2mat(comp(i)),F,'')
   set(gcf,'Position',[649 323 949 216] )
   colorbar('FontSize',14,'FontWeight','bold','LineWidth',1.5);
   fig.Visible="on";
   saveas(gcf, [num2str(round(freq(9)/1000)) ' kHz ' func2str(F) ' ' cell2mat(comp(i))],'fig')
   % saveas(gcf, [num2str(round(freq(9)/1000)) ' kHz ' func2str(F) ' ' cell2mat(comp(i))],'tif')
end