Created
September 19, 2018 13:54
-
-
Save rohit-gupta/51cff5dbc400a7830ee2f70f56096b30 to your computer and use it in GitHub Desktop.
Scatter plot with neat text lables using ggrepel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic Name Plot | |
tax_plot <- ggplot(State_Infrastructure, aes(x=tax_burden, y=percent_bad_roads, label=State)) | |
tax_state_names_plot <- tax_plot + geom_text_repel() + geom_point(color = 'red') + theme_classic(base_size = 16) | |
# OUTPUT | |
tax_state_names_plot + ggtitle("Road Conditions vs Tax Burden") + | |
scale_x_continuous(name = "State and Local Tax Burden") + | |
scale_y_continuous(name = "Percent of roads not in good condition") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment