left_color = [1 0 0];
right_color = [0 0 1];
set(f2,'defaultAxesColorOrder',[left_color; right_color]);
yyaxis right
plot(x,CA2,'b','LineWidth',2)
hold on
plot(x,NY2,'-','MarkerFaceColor','b','LineWidth',2)
plot(x,FL2,'-','MarkerFaceColor','b','LineWidth',2)
ylabel('Percent Unsheltered','fontsize', 14);
set(get(gca,'YLabel'),'Rotation',-90)
yyaxis left
p1=plot(x,CA1/1000,'r')
hold on
p2=plot(x,NY1/1000,'r-^','MarkerFaceColor','r')
p3=plot(x,FL1/1000,'r-o','MarkerFaceColor','r')
legend([p1 p2 p3],{'\color{red} CA','\color{red} NY','\color{red} FL'},'Location','best','fontsize', 14);
ylabel('Homeless Population (Thousands)','fontsize', 14)
ylim([0 150]);
annotation('doublearrow',[0.14 0.31],[0.7 0.7],'LineWidth',1)
annotation('rectangle',[0.13 0.11 0.193 0.814],'FaceColor',[0.6 0.6 0.6],'EdgeColor', 'none','FaceAlpha',0.2)
text(2007.15,115,'Recession')
text(2006.7,141,'CA','Color', 'b')
text(2006.7,122,'NY','Color', 'b')
text(2006.7,20,'FL','Color', 'b')
text(2017.1,135,'-3.4%','Color','r','fontsize', 14)
text(2017.1,90,'+43.0%','Color','r','fontsize', 14)
text(2017.1,33.5,'-33.0%','Color','r','fontsize', 14)
text(2009.8,100,'NY Shelter System Growth','Color','b','fontsize', 12)
annotation('arrow',[0.43 0.45],...
[0.68 0.84],'LineWidth',1,'Color','b')
legend1 = legend('show');
set(legend1,...
'Position',[0.0242817408376966 0.78412296037296 0.0675392670157068 0.0952797202797202],...
'FontSize',14);
box off
xlim([2006 2018])
xlabel('Years');
xticks([2007 2009 2011 2013 2015 2017])
box on
annotation('line',[0.903664921465969 0.904712041884817],...
[0.924825174825175 0.11013986013986],'Color',[0 0 1],'LineWidth',3);
set(gca,'XGrid','off')
set(gca,'YGrid','on')
ax = gca;
ax.GridColor = [0, 0, 0];
set(gcf,'color','w');
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 .5 .5]);
title('Largest Homeless Populations 2007-2017', 'fontsize', 18);