Cara Thompson Profile picture
Apr 6 โ€ข 5 tweets โ€ข 3 min read
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 Code snippet: blend <- func...
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.: Code snippet:   coord_fixed...
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.: Code snippet:  # plot code....
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! Image

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with Cara Thompson

Cara Thompson Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(