I have tried many solutions I found in the internet but none of them worked for me sadly. I want to sort my Y axis because for osme reason it randomly picks which value to show first. Here is my code:
ggplot(Dane,aes(Dane$State, Dane$`Unsheltered persons (% Homeless population)`))+
geom_point(aes(Dane$State, Dane$`Unsheltered persons (% Homeless population)`),, color="red")+
theme(text = element_text(size=15),axis.text.x = element_text(angle=90, hjust=1))+
labs(title = "Wykres przedstawiajacy jaka czesc populacji nie ma schronienia",
x="Stan", y="Brak schronienia")
As you can see Y axis doesn't go from lowest ot highest % value:
Here is how data looks like:
State `Total Homeless~ `Rate of Homele~ `Chronic indivi~ `Chronic Person~ `Chronic Homele~ `Persons in fam~ `Unaccompanied ~
<chr> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
1 Alab~ 4689 9.7 16.4% 1.9% 18.3% 27.8% 8.4%
2 Alas~ 1946 26.5 8.5% 0.9% 9.5% 30.0% 8.6%
3 Ariz~ 10562 15.9 10.1% 1.2% 11.2% 38.4% 6.4%
4 Arka~ 3812 12.9 14.8% 1.0% 15.8% 16.7% 7.6%
5 Cali~ 136826 35.7 25.9% 2.8% 28.7% 18.3% 11.3%
6 Colo~ 9754 18.5 13.9% 4.4% 18.2% 52.2% 5.2%
7 Conn~ 4448 12.4 19.6% 3.9% 23.5% 30.3% 5.3%
8 Dela~ 946 10.2 6.9% 0.6% 7.5% 39.2% 3.7%
9 Dist~ 6865 106. 25.7% 3.8% 29.5% 46.2% 2.4%
10 Flor~ 47862 24.5 16.3% 3.9% 20.2% 34.5% 7.2%