yr1=1950:10:1990;
tab1=[ ... 
             22.3395
             21.5478
             21.1541
             22.0734
             23.8576
];
 
yr2=1980:10:2000;
tab2=[ ... 
             21.6710
             23.4770
             23.4990
];
 
figure(1)
set(gca,'XTick',[1950 1960 1970 1980  1990 2000])
title('Chart B1: Two Methods of Calculating Average Hours: Total Population  ', 'FontSize',16)
xlabel( 'year', 'FontSize',14)
ylabel( 'average hours', 'FontSize',14)
line(yr1,tab1,'LineWidth',2,'Color',[0,0,1]           ,'Marker','s','MarkerFaceColor',[0,0,1])
line(yr2,tab2,'LineWidth',2,'Color',[1,0,0]           ,'Marker','s','MarkerFaceColor',[1,0,0])
legend(                               'based on hrswork2','based on uhrswork',1)
axis([1950,2000,10,35]);
grid
  print -dpsc comparison_1
 
yr1=1950:10:1990;
tab1=[ ... 
             34.1804
             31.9268
             29.7506
             28.7002
             29.1089
];
 
yr2=1980:10:2000;
tab2=[ ... 
             28.1930
             28.6220
             27.7840
];
 
figure(2)
set(gca,'XTick',[1950 1960 1970 1980  1990 2000])
title('Chart B2: Two Methods of Calculating Average Hours: Males             ', 'FontSize',16)
xlabel( 'year', 'FontSize',14)
ylabel( 'average hours', 'FontSize',14)
line(yr1,tab1,'LineWidth',2,'Color',[0,0,1]           ,'Marker','s','MarkerFaceColor',[0,0,1])
line(yr2,tab2,'LineWidth',2,'Color',[1,0,0]           ,'Marker','s','MarkerFaceColor',[1,0,0])
legend(                               'based on hrswork2','based on uhrswork',1)
axis([1950,2000,10,35]);
grid
  print -dpsc comparison_2
 
yr1=1950:10:1990;
tab1=[ ... 
             10.8700
             11.8416
             13.3776
             16.0203
             19.0291
];
 
yr2=1980:10:2000;
tab2=[ ... 
             15.8160
             18.7720
             19.5090
];
 
figure(3)
set(gca,'XTick',[1950 1960 1970 1980  1990 2000])
title('Chart B3: Two Methods of Calculating Average Hours: Females           ', 'FontSize',16)
xlabel( 'year', 'FontSize',14)
ylabel( 'average hours', 'FontSize',14)
line(yr1,tab1,'LineWidth',2,'Color',[0,0,1]           ,'Marker','s','MarkerFaceColor',[0,0,1])
line(yr2,tab2,'LineWidth',2,'Color',[1,0,0]           ,'Marker','s','MarkerFaceColor',[1,0,0])
legend(                               'based on hrswork2','based on uhrswork',1)
axis([1950,2000,10,35]);
grid
  print -dpsc comparison_3
 
