I am trying to add numbers and labels to this scatterplot
clc clear all close all %reading the file [numbers text]=xlsread('homelesspopinamerica.xlsx'); %manipulating withthe data and storing it at our convenience statenames=text(2:51,1:2); pop=numbers(1:50,:); states=statenames(:,2); state=statenames(:,2); homepop=pop(:,2); homeperc=pop(:,4); totpop=pop(:,3); states=categorical(states); %create scatter figure figure scatter(homeperc,totpop,homepop/20,states,'filled') title('HOMELESSNESS IN AMERICA 2017', 'fontsize', 36); set(gcf,'color','w'); xlabel('Percentage of Homeless Indviduals') ylabel('Total Population (millions)') axis([0 0.6 0 4.5e7]); grid on %make graph large set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
i want to label them by total homeless population (column D in excel sheet) and by state abbreviation (column B) and have the label inside the bubbles that it fits into. how can i do this? here is an example of what i am looking for:
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
0 Comments
Sign in to comment.