Five quick #rstats tips I've picked up in the plots I've made for the first category of the #30DayChartChallenge ๐งต๐
1. Need to plot a million points and ggplot() is taking too long but you want to stay within the tidyverse?
๐ Use ๐ฆ{scattermore} with geom_scattermore() ๐ฅณ
2.Using several subplots together to tell a story and they each have their own colour scheme?
๐ Create a function to blend in a bit of the same colour into all the others to create a more unified look
3. Struggling with squished images when using {ggimage}?
๐ Plot the data with a ratio of 1:1 and use coord_equal()
๐ If that's not an option (e.g. x is categorical), adjust the ratio of the x to y increments within coord_fixed(), e.g.:
4. Picked a nice font and then realised it doesn't do numbers?
๐If there's a similar one that will do for numbers, change font on the fly with ๐ฆ{ggtext} and element_markdown(), e.g.:
5. And finally, the I really wish I'd known earlier. Want to change the background colour of your plot?
๐ No need to change everything within +theme()! Instead, pass the colour into ggsave! ๐คฏ
Would have saved me a lot of time on so many #tidyTuesday plots!
โข โข โข
Missing some Tweet in this thread? You can try to
force a refresh