Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- income.boxplot <- ggplot(income.by.state, aes(x = State, y = Estimate)) +
- geom_boxplot() +
- coord_flip() + scale_x_discrete(limits = rev(levels(income$State))) +
- labs(title = "Median household income by state",
- subtitle = "Source: 2011-2015 American Community Survey") +
- theme(plot.title = element_text(hjust = 0.5)) +
- labs(x = "State",
- y = "Median household income",
- fill = "Median household income") +
- theme_fivethirtyeight() +
- theme(axis.line.x = element_line(size = .5, colour = "black"),
- axis.title = element_text(size = 14),
- legend.position = "right",
- legend.direction = "vertical",
- legend.box = "vertical",
- legend.key.size = unit(0.7, "cm"),
- legend.text = element_text(size = 10),
- text = element_text(family = "OfficinaSanITC-Book"),
- plot.title = element_text(family = "OfficinaSanITC-Book"))
- income.boxplot
- 1 Ziebach County Median Household Income ($) South Dakota 35119
- 2 Zavala County Median Household Income ($) Texas 26672
- 3 Zapata County Median Household Income ($) Texas 32162
- 4 Yuma County Median Household Income ($) Colorado 43105
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement