From bd8897fd2af4e97f9549e35e8b5498155e39086d Mon Sep 17 00:00:00 2001 From: Cee Nell <cnell@usgs.gov> Date: Wed, 20 Mar 2024 19:00:57 +0000 Subject: [PATCH] guides suggestion --- 3_visualize/src/plot_utils.R | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/3_visualize/src/plot_utils.R b/3_visualize/src/plot_utils.R index b62a0f7..92d4085 100644 --- a/3_visualize/src/plot_utils.R +++ b/3_visualize/src/plot_utils.R @@ -32,7 +32,15 @@ plot_census_map <- function(census_data, conus_sf, pal, leg_title, outfile_path, linetype = "solid") + theme_void() + theme(text = element_text(family = font_legend, size = font_size), - legend.margin = margin(r = 10)) + legend.margin = margin(r = 10), legend.position = 'bottom') + + guides(fill = guide_colorbar( + title.position = "top", + title.theme = element_text(face = 'bold'), + direction = "horizontal", + position = "bottom", + barwidth = 20, + barheight = 1 + ) if (percent_leg == FALSE) { census_map <- census_map + -- GitLab