%load bigsimu; %whentime=[100 500 750 1500 3000 6000]; load nov5.mat whentime=[100 250 500 750 1000]; for i=1:20 for j=1:length(whentime) firstchick(1,i,j)=dataA(whentime(j),1,i); firstchick(2,i,j)=dataB(whentime(j),1,i); firstchick(3,i,j)=dataC(whentime(j),1,i); firstchick(4,i,j)=dataD(whentime(j),1,i); firstchickspecial(1,i,j)=dataA(whentime(j),2,i); firstchickspecial(2,i,j)=dataB(whentime(j),2,i); firstchickspecial(3,i,j)=dataC(whentime(j),2,i); firstchickspecial(4,i,j)=dataD(whentime(j),2,i); laterchick(1,i,j)=dataA(whentime(j),3,i); laterchick(2,i,j)=dataB(whentime(j),3,i); laterchick(3,i,j)=dataC(whentime(j),3,i); laterchick(4,i,j)=dataD(whentime(j),3,i); end end figure(1); clf; subplot(2,2,1); %dataplot4scen(1:length(whentime),squeeze(firstchickspecial(1,:,:)),[0 0.4470 0.7410], 's'); hold on; dataplot4scen((1:length(whentime))-0.2,squeeze(firstchick(1,:,:)),[0 0.5 0], '^'); dataplot4scen((1:length(whentime))+0.2,squeeze(laterchick(1,:,:)),[0.8500 0.3250 0.0980], 'o'); axis([0 6 0.25 0.75]); plot([0 6],[.5 .5],'k:'); xticks(1:length(whentime)); xticklabels(whentime); axis('square') %title(['Year ' int2str(whentime(1))]); subplot(2,2,2); dataplot4scen(whentime,squeeze(firstchickspecial(2,:,:)),[0 0.4470 0.7410], 's'); hold on; dataplot4scen(whentime,squeeze(firstchick(2,:,:)),[0 0.5 0], '^'); dataplot4scen(whentime,squeeze(laterchick(2,:,:)),[0.8500 0.3250 0.0980], 'o'); axis([50 1050 0.25 0.75]); plot([0 1050],[.5 .5],'k:'); xticks([250 500 750 1000]); axis('square') subplot(2,2,3); %dataplot4scen(whentime,squeeze(firstchickspecial(3,:,:)),[0 0.4470 0.7410], 's'); hold on; dataplot4scen(whentime,squeeze(firstchick(3,:,:)),[0 0.5 0], '^'); dataplot4scen(whentime,squeeze(laterchick(3,:,:)),[0.8500 0.3250 0.0980], 'o'); axis([50 1050 0.25 0.75]); plot([0 1050],[.5 .5],'k:'); xticks([250 500 750 1000]); axis('square') subplot(2,2,4); dataplot4scen(whentime,squeeze(firstchickspecial(4,:,:)),[0 0.4470 0.7410], 's'); hold on; dataplot4scen(whentime,squeeze(firstchick(4,:,:)),[0 0.5 0], '^'); dataplot4scen(whentime,squeeze(laterchick(4,:,:)),[0.8500 0.3250 0.0980], 'o'); axis([50 1050 0.25 0.75]); plot([0 1050],[.5 .5],'k:'); xticks([250 500 750 1000]); axis('square') hold off print -depsc BSR %% non subplot figure; clf; rectangle('Position',[1.50 0.251 1 0.498], 'EdgeColor',[.95 .95 .95], 'FaceColor', [.95 .95 .95]); hold on; rectangle('Position',[3.50 0.251 1 0.498], 'EdgeColor',[.95 .95 .95], 'FaceColor', [.95 .95 .95]); hold on; %dataplot4scen(1:length(whentime),squeeze(firstchickspecial(1,:,:)),[0 0.4470 0.7410], 's'); hold on; dataplot4scen((1:length(whentime))-0.26,squeeze(firstchick(1,:,:)),[0 0.5 0], '^'); dataplot4scen((1:length(whentime))+0.26,squeeze(laterchick(1,:,:)),[0.8500 0.3250 0.0980], 'o'); axis([0.5 5.5 0.25 0.75]); plot([0 6],[.5 .5],'k:'); % for i=1:(length(whentime)-1) % line([i+0.5 i+0.5],[0.25 0.75],'Color', [0.75 0.75 0.75], 'LineStyle', '--') % end xticks(1:length(whentime)); xticklabels(''); yticks([0.3:0.1:0.7]); axis('square') %xlabel('Year') ylabel('BSR (proportion male) \pm 95% CI') legend({'Early hatched', 'Later hatched'}, 'FontSize', 12, 'Location', 'southwest') set(gca, 'Box','on','FontSize', 15) text(0.5+0.04*(5.5-0.5), 0.75-0.04*(0.75-0.25), 'B', 'FontSize', 15, 'FontWeight','Bold'); title('1. High ? predation, 2 traits', 'FontWeight','Normal', 'FontSize', 15); %title(['Year ' int2str(whentime(1))]); print -depsc BSR1 figure; clf; rectangle('Position',[1.50 0.251 1 0.498], 'EdgeColor',[.95 .95 .95], 'FaceColor', [.95 .95 .95]); hold on; rectangle('Position',[3.50 0.251 1 0.498], 'EdgeColor',[.95 .95 .95], 'FaceColor', [.95 .95 .95]); hold on; dataplot4scen(1:length(whentime),squeeze(firstchickspecial(2,:,:)),[0 0.4470 0.7410], 's'); hold on; dataplot4scen((1:length(whentime))-0.26,squeeze(firstchick(2,:,:)),[0 0.5 0], '^'); dataplot4scen((1:length(whentime))+0.26,squeeze(laterchick(2,:,:)),[0.8500 0.3250 0.0980], 'o'); % for i=1:(length(whentime)-1) % line([i+0.5 i+0.5],[0.25 0.75],'Color', [0.75 0.75 0.75], 'LineStyle', '--') % end axis([0.5 5.5 0.25 0.75]); plot([0 6],[.5 .5],'k:'); xticks(1:length(whentime)); xticklabels(''); yticks([0.3:0.1:0.7]); yticklabels(''); axis('square') %xlabel('Year') %ylabel('BSR (Proportion male)') legend({'Early hatched (island)', 'Early hatched (mainland)', 'Later hatched'}, 'FontSize', 12, 'Location', 'southwest') set(gca, 'Box','on','FontSize', 15) text(0.5+0.04*(5.5-0.5), 0.75-0.04*(0.75-0.25), 'C', 'FontSize', 15, 'FontWeight','Bold'); title('2. High ? predation, 3 traits', 'FontWeight','Normal', 'FontSize', 15); print -depsc BSR2 figure; clf; rectangle('Position',[1.50 0.251 1 0.498], 'EdgeColor',[.95 .95 .95], 'FaceColor', [.95 .95 .95]); hold on; rectangle('Position',[3.50 0.251 1 0.498], 'EdgeColor',[.95 .95 .95], 'FaceColor', [.95 .95 .95]); hold on; %dataplot4scen(1:length(whentime),squeeze(firstchickspecial(3,:,:)),[0 0.4470 0.7410], 's'); hold on; dataplot4scen((1:length(whentime))-0.26,squeeze(firstchick(3,:,:)),[0 0.5 0], '^'); dataplot4scen((1:length(whentime))+0.26,squeeze(laterchick(3,:,:)),[0.8500 0.3250 0.0980], 'o'); % for i=1:(length(whentime)-1) % line([i+0.5 i+0.5],[0.25 0.75],'Color', [0.75 0.75 0.75], 'LineStyle', '--') % end axis([0.5 5.5 0.25 0.75]); plot([0 6],[.5 .5],'k:'); xticks(1:length(whentime)); xticklabels(whentime); yticks([0.3:0.1:0.7]); axis('square') xlabel('Year') ylabel('BSR (proportion male) \pm 95% CI') legend({'Early hatched', 'Later hatched'}, 'FontSize', 12, 'Location', 'southwest') set(gca, 'Box','on','FontSize', 15) text(0.5+0.04*(5.5-0.5), 0.75-0.04*(0.75-0.25), 'D', 'FontSize', 15, 'FontWeight','Bold'); title('3. Equal predation, 2 traits', 'FontWeight','Normal', 'FontSize', 15); print -depsc BSR3 figure; clf; rectangle('Position',[1.50 0.251 1 0.498], 'EdgeColor',[.95 .95 .95], 'FaceColor', [.95 .95 .95]); hold on; rectangle('Position',[3.50 0.251 1 0.498], 'EdgeColor',[.95 .95 .95], 'FaceColor', [.95 .95 .95]); hold on; dataplot4scen(1:length(whentime),squeeze(firstchickspecial(4,:,:)),[0 0.4470 0.7410], 's'); hold on; dataplot4scen((1:length(whentime))-0.26,squeeze(firstchick(4,:,:)),[0 0.5 0], '^'); dataplot4scen((1:length(whentime))+0.26,squeeze(laterchick(4,:,:)),[0.8500 0.3250 0.0980], 'o'); % for i=1:(length(whentime)-1) % line([i+0.5 i+0.5],[0.25 0.75],'Color', [0.75 0.75 0.75], 'LineStyle', '--') % end axis([0.5 5.5 0.25 0.75]); plot([0 6],[.5 .5],'k:'); xticks(1:length(whentime)); xticklabels(whentime); yticklabels(''); yticks([0.3:0.1:0.7]); axis('square') xlabel('Year') %ylabel('BSR (Proportion male)') legend({'Early hatched (island)', 'Early hatched (mainland)', 'Later hatched'}, 'FontSize', 12, 'Location', 'southwest') set(gca, 'Box','on','FontSize', 15) text(0.5+0.04*(5.5-0.5), 0.75-0.04*(0.75-0.25), 'E', 'FontSize', 15, 'FontWeight','Bold'); title('4. Equal predation, 3 traits', 'FontWeight','Normal', 'FontSize', 15); print -depsc BSR4