I'm trying to map the state of Ohio out in ggplot2 and I would like different variables within a range to the same color. I can do a scale_fill_continuous
, but I can't seem to get the range down. Ideally I like to have 0-10 green, 11-20 blue, 21-30 orange and so on.
Here is my code:
ggplot(oh_map, aes(x = long, y = lat)) +
geom_polygon(aes(fill = wheat_pmt, group = group)) +
geom_path(aes(group = group)) +
geom_text(data = cnames,
aes(label = paste0("$", round(wheat_pmt, digits = 0)),
family="A", fontface="bold", size=4.2)) +
scale_fill_continuous(low = "white", high = "red", na.value = "black",
limit=c(0,34), oob=squish)+
labs(title = "Ohio Wheat ARC-CO Payments: Program Year 2018",
subtitle = "Rounded to Nearest Dollar, adusted for 85% of Base Acres and a 6.8% Government Sequestration",
fill = "Dollars per Acre",
caption = "Data Source: Author Calculation")+
theme(axis.line=element_blank(),
axis.text.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks=element_blank(),
axis.title.x=element_blank(),
axis.title.y=element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.border = element_blank(),
panel.background = element_blank(),
legend.position = "",
plot.title = element_text(hjust = 0.5,family="A",face="bold",size = 20.0),
plot.subtitle = element_text(hjust = 0.5,family="A",face="bold"))