AOI=[0 0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 8 8 8 8 8 8];
row1=[35 35 35 35 36 36.5 37 35 37 35 36 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35 35 35 35 35 36 36.5 37 35 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35];
col1= [56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47 56 56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47];
row2=[35 35 35 35 36 36.5 37 35 37 35 36 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35 35 35 35 35 36 36.5 37 35 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35];
col2= [56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47 56 56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47];
row3=[35 35 35 35 36 36.5 37 35 37 35 36 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35 35 35 35 35 36 36.5 37 35 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35];
col3= [56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47 56 56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47];
row4=[25 25 25 25 26 26.5 27 25 27 25 26 27 26 25 27 24 24 25 26 26 26 27 27 27 28 28 24 24 25 25 25 25 25 25 25 25 25 26 26.5 27 25 27 26 25 27 24 24 25 26 26 26 27 27 27 28 28 24 24 25 25 25 25 25];
col4= [56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47 56 56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47];
row5=[35 35 35 35 36 36.5 37 35 37 35 36 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35 35 35 35 35 36 36.5 37 35 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35];
col5= [66 67 67 68 66 67 66 66 66 67 65 65 66 66 66 64 65 65 66 66 67 67 68 68 66 66 65 66 65 66 67 66 66 67 67 68 66 67 66 66 66 67 65 65 66 66 66 64 65 65 66 66 67 67 68 68 66 66 65 66 65 66 67];
row6=[35 35 35 35 36 36.5 37 35 37 35 36 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35 35 35 35 35 36 36.5 37 35 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35];
col6= [56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47 56 56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47];
row7=[35 35 35 35 36 36.5 37 35 37 35 36 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35 35 35 35 35 36 36.5 37 35 37 36 35 37 34 34 35 36 36 36 37 37 37 38 38 34 34 35 35 35 35 35];
col7= [56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47 56 56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47];
row8=[2:2:126];
col8= [56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47 56 56 57 57 58 56 57 56 56 56 57 45 45 46 46 46 44 45 45 46 46 47 47 48 48 46 46 45 46 45 46 47];
coord=[2:2:126];
times=[1:63];
AOI_unique=unique(AOI);
num_AOI=length(AOI_unique);
colors={'r' 'g' 'b' 'c' };
figure
hplt=plot(times,coord, 'DisplayName', 'coord\_pos\_sibs\_xfpi');
hold on
hleg=legend('-DynamicLegend');
set(hleg, 'FontSize',10);
grid on
datetick('x','HH:MM:SS', 'keeplimits')
title('Position of SIBS on FPI')
xlim([min(times), max(times)])
xlabel('Time (UT)');
ylabel('Value');
hold on
for i=1:length(AOI_unique)
if AOI_unique(i)==1
hplt=plot(times, col1, colors{mod(i-1,4)+1}, 'DisplayName', 'column 1');
hold on
hplt=plot(times, row1, 'c--', 'DisplayName', 'row 1');
hold on
hleg=legend('-DynamicLegend');
set(hleg, 'FontSize',10);
grid on
elseif AOI_unique(i)==2
hplt=plot(times, col2, colors{mod(i-1,4)+1}, 'DisplayName', 'column 2');
hold on
hplt=plot(times, row2, 'g--', 'DisplayName', 'row 2');
hold on
hleg=legend('-DynamicLegend');
set(hleg, 'FontSize',10);
grid on
elseif AOI_unique(i)==3
hplt=plot(times, col3, colors{mod(i-1,4)+1}, 'DisplayName', 'column 3');
hold on
hplt=plot(times, row3, 'b--', 'DisplayName', 'row 3');
hold on
hleg=legend('-DynamicLegend');
grid on
elseif AOI_unique(i)==4
hplt=plot(times, col4, colors{mod(i-1,4)+1}, 'DisplayName', 'column 4');
hold on
hplt=plot(times, row4, 'r--', 'DisplayName', 'row 4');
hold on
hleg=legend('-DynamicLegend');
set(hleg, 'FontSize',10);
grid on
elseif AOI_unique(i)==5
hpltA=plot(times, col5, colors{mod(i-1,4)+1}, 'DisplayName', 'column 5');
hold on
hplt=plot(times, row5, 'c--', 'DisplayName', 'row 5');
hold on
hleg=legend('-DynamicLegend');
set(hleg, 'FontSize',10);
grid on
elseif AOI_unique(i)==6
hplt=plot(times, col6, colors{mod(i-1,4)+1}, 'DisplayName', 'column 6');
hold on
hpltA=plot(times, row6, 'g--', 'DisplayName', 'row 6');
hold on
hleg=legend('-DynamicLegend');
set(hleg, 'FontSize',10);
grid on
elseif AOI_unique(i)==7
hplt=plot(times, col7, colors{mod(i-1,4)+1}, 'DisplayName', 'column 7');
hold on
hplt=plot(times, row7, 'b--', 'DisplayName', 'row 7');
hold on
hleg=legend('-DynamicLegend');
set(hleg, 'FontSize',10);
grid on
elseif AOI_unique(i)==8
hplt=plot(times, col8, colors{mod(i-1,4)+1}, 'DisplayName', 'column 8');
hold on
hplt=plot(times, row8, 'r--', 'DisplayName', 'row 8');
hold on
hleg=legend('-DynamicLegend');
set(hleg, 'FontSize',10);
grid on
end
end
Best Answer