Created
April 24, 2022 16:31
-
-
Save justinm0rgan/095a7c15fa7cc53be930be059ae8b264 to your computer and use it in GitHub Desktop.
Add north arrow and scale bar to plot using ggplot and ggspatial
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
| # create plot | |
| nyc_cd_market_comp_plot <- nyc_cd_market_plot + | |
| annotation_scale( | |
| location = "bl", | |
| pad_x = unit(3, "cm") | |
| ) + | |
| annotation_north_arrow( | |
| location = "br", | |
| pad_x = unit(0.5, "in"), | |
| style = north_arrow_fancy_orienteering | |
| ) + | |
| theme(panel.grid = element_line(color = "transparent")) | |
| # save plot | |
| ggsave("./images/nyc_cd_market_comp_plot.png", plot = nyc_cd_market_comp_plot) | |
| # preview results | |
| nyc_cd_market_comp_plot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment