function add_N_to_plot(N_transpose,first_year,figure_handle); % add_N_to_plot(N_transpose,first_year,figure_handle) % % Given a figure made by datpar2plot, adds the population % trajectory defined in N_transpose. N_transpose has one % cohort per ROW, the oldest in the first row. % % Cohorts are assumed to be born in consecutive years, % first_year being the first. % % Written by Lennart Frimannslund, April 2010. if (exist('figure_handle','var') == 1), % Set figure figure(figure_handle); end; N0scale = 1000; %N = N_transpose'; colors = {'r' 'g' 'b' 'c' 'm' 'y' 'k'}; hold on; for (i=1:size(N_transpose,2)), plot(first_year+(i-1)+[0:size(N_transpose,1)-1],N_transpose(:,i)/N0scale,sprintf('%s-^',colors{i})) end;