loadall [socecon_country,gdp,lifexp]=textread('gdplife','%q %f %f'); [gdp_country,gdpgrow]=textread('gdpgrow','%q %f'); [fh_country,fh_polright,fh_civlib]=textread('polfri','%q %f %f'); clf hold on x=[]; for i=1:size(heritage_country,1) loc=find(strcmp(heritage_country(i),gdp_country)); if (~isempty(loc)) if (~isnan(heritage_freedom(i))) loc2=find(strcmp(heritage_country(i),socecon_country)); if (~isempty(loc2)) loc3=find(strcmp(heritage_country(i),fh_country)); if (~isempty(loc3)) fh1=heritage_freedom(i); fh2=(.01*gdpgrow(loc))*gdp(loc2); fh3=log(gdp(loc2))/log(10); fh4=(15-fh_polright(loc3)-fh_civlib(loc3))*100; fh5=lifexp(loc2); scatter3(fh1,fh2,fh3,fh4,fh5,'.') gg=text(fh1,fh2,fh3-.1,gdp_country(loc)); set(gg,'HorizontalAlignment','center'); set(gg,'FontSize',[6]); % tt=plot3([fh1 fh1],[fh2 fh2],[2.5 fh3],'g'); % set(tt,'Color',[0.8 0.8 0.8]); x=[x; fh1 fh2 fh3]; end end end else heritage_country(i) end end colorbar gg=xlabel('Heritage Freedom Index'); set(gg,'FontSize',[20]); gg=ylabel('GDP change per capita'); set(gg,'FontSize',[20]); gg=zlabel('Log GDP per Capita'); set(gg,'FontSize',[20]); %text(1.6,2.4,'Free'); %text(4.7,2.4,'Unfree'); %gg=text(1.4,.5,'Free'); %set(gg,'Rotation',[90]); %gg=text(1.4,7.3,'Unfree'); %set(gg,'Rotation',[90]); r=corrcoef(x); r=r(1,2);