![]() Here ggtext::geom_richtext() handles the proper scaling of the image without really any intervention from us! While geom_richtext() is very useful we’re sort of using it out of its normal context. However, there’s an even easier way thanks to ggtext! While this may seem like a bit of work, it’s a good habit to think explicitly about what size or ratio you want to save your plots out as (it can inform how big to make your text amongst other things). Width = 0.4 ) + scale_color_identity (aesthetics = c ( "fill", "color" ) ) + geom_vline (xintercept = 0, color = "black", size = 1 ) + theme_minimal ( ) + scale_x_continuous (breaks = scales :: pretty_breaks (n = 10 ) ) + labs (x = "\nQBR",Ī = element_text (size = 16, face = "bold" ),Ī = element_text (margin = margin (r = - 25, unit = "pt" ) ), X = qbr_total, y = fct_reorder ( name, qbr_total ), Side_plot % mutate (label = link_to_img ( headshot_href ), Plot.caption = element_markdown (size = 12 ),Īxis.text = element_text (size = 14, face = "bold" ),Ī = element_text (size = 16, face = "bold" ) ) Plot.subtitle = element_text (size = 16 ), Plot.title = element_text (face = "bold", size = 20 ), Width = 0.4 ) + scale_color_identity (aesthetics = c ( "fill", "color" ) ) + geom_hline (yintercept = 0, color = "black", size = 1 ) + theme_minimal ( ) + scale_x_continuous (breaks = c ( 1, seq ( 5, 30, by = 5 ) ), limits = c ( 0.5, 34 ) ) + scale_y_continuous (breaks = scales :: pretty_breaks (n = 10 ) ) + labs (x = NULL,Ĭaption = "**Data:** espnscrapeR | **Plot:** ) + theme ( Rank = as.integer ( rank ) ) %>% ggplot ( ) + geom_col ( aes (įill = team_color, color = team_alt_color ),
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |