location.longitude = 9; 
location.latitude = 61; 
location.altitude = 1000;
time.year = 2013;
time.month = 6;
time.day = 20;  
time.hour = 12;
time.min = 0;
time.sec = 0;
time.UTC = 2;
figure(2);
clf;
figure(3);
clf;
figure(2);
Colours=lines(12);
h=[];
for j=6:12
    time.month=j;
        sun_a=[];
for i = 0:23
    time.hour=i;
    for k=[0 30]
        time.min=k;
    sun=sun_position(time,location);
    sun_a=[sun_a;[sun.zenith sun.azimuth]];
    end
end
time.hour=24;
time.min=0;
    sun=sun_position(time,location);
    sun_a=[sun_a;[sun.zenith sun.azimuth]];
h=[h;plot(0:0.5:24,90-sun_a(:,1),'-','color',Colours(j,:))];
hold on;
figure(3);
plot(0:0.5:24,90-sun_a(:,2),'-','color',Colours(j,:));
hold on;
figure(2);
end
hline(0,'k');
h=[h;hline(-6,'g')];
h=[h;hline(-12,'b')];
h=[h;hline(-18,'r')];
legend(h,'Jun','May/Jul','Apr/Aug','Mar/Sep','Feb/Oct','Jan/Nov','Dec','Civil Twilight','Nautical Twilight','Astronomica Twilightl','location','nw');
axis([0 24 -20 60]);
set(gca,'ygrid','on')
set(gca,'xtick',0:2:24)
set(gca,'ytick',-20:5:60)
xlabel('Time (24 hour)');
ylabel('Angle of sun (° off horizontal)');
savefig(['sun_angle'],figure(2),'pdf','png','-c0.1','-r300');