% ___ 2D -  Basis  - Plot____
% _______________________________________________
clear all; close all; clf;

% ===> Monthly averaged temperature (1961-1990) Portland International Airport 

disp(['°°°°°°°°°°°°° S T A R T °°°°°°°°°°°° ' ,date, ' °°°°°°°°°°°°°°'])
fprintf(1, '\n')   
% 1.) The first is the number of the month, and the second is the mean precipitation
%       recorded at the Portland International Airport between 1961 and 1990

% 2.) Temperatures are in degrees Farenheit
lab = {'  Month', ' High' , ' Low ',  ' Average'};
data = [ 1    45.36  33.84   39.6;
            2    50.87  35.98   43.43;
            3    56.05  38.55   47.3;
            4    60.49  41.36   50.92;
            5    67.17  46.92   57.05;
            6    73.82  52.8     63.31;
            7    79.72  56.43   68.07;
            8    80.14  56.79   68.47;
            9    74.54  51.83   63.18;
          10    64.08  44.95   54.52;
          11    52.66  39.54   46.1;
          12    45.59  34.75   40.17];

 mon = data(:,1) ;   
 
 figure(1)
 set(gca, 'color',[ 0.5 0.5 0.5])
    Ha = plot(mon, data(:,2:3), 'o');                    % plot precip vs. month with circles
    %  set(Ha, 'markersize', 6, 'Linewidth',1.5)
    xlabel('month of the year');                 
    ylabel('mean precipitation (inches)');
 
 pause(2)
 
 figure(2)
 set(gca, 'color', 'k')
    plot(mon, data(:,1),'ro',mon, data(:,2),'c+',mon, data(:,3),'g-');
    xlabel(lab(1));                              
    ylabel('temperature (degrees F)');
    title('Monthly average temp. for Portland Intern. Airport');
    % >> add a plot legend 
    leg = [lab(2); lab(3); lab(4)];
    legend(leg,0);
    title('Mean monthly precipitation at Portland International Airport');
 
 % ___________P R I N T - DATUM_________________________________
ax4 = axes('Position',[0.02,0.03,0.001,0.001],'Color','none','YColor','w');
printdate2 = ['printed on : ', datestr(now, 22), '.'];
printdate3 = {'U W E - Testplot', printdate2};
text(-0.2, -0.08, printdate3, 'units', 'normalized', 'fontangle', 'italic', 'fontsize', 8);
pause(1)
