Creator of the EpiRHandbook: https://epirhandbook.com/
1) Ggplot customization possibilities are pretty endless.
2) Merry Christmas and happy holidays to you all!
🎄🎄🎄
1) Ggplot customization possibilities are pretty endless.
2) Merry Christmas and happy holidays to you all!
🎄🎄🎄
We used the {showtext} package for this: font_add_google() loads the font from Google Fonts, and showtext_auto() ensures R applies the font to the plot.
We used the {showtext} package for this: font_add_google() loads the font from Google Fonts, and showtext_auto() ensures R applies the font to the plot.
Since he didn't share his location, we created a function (get_random_night_coords()) to randomly generate coordinates of a location with a current local time between 11pm and 3am, assuming those are his working hours!
Close enough!
Since he didn't share his location, we created a function (get_random_night_coords()) to randomly generate coordinates of a location with a current local time between 11pm and 3am, assuming those are his working hours!
Close enough!
geom_image() from {ggimage} places the image at specified coordinates, reading from the file path.
Here's the ggplot code for the second figure:
geom_image() from {ggimage} places the image at specified coordinates, reading from the file path.
Here's the ggplot code for the second figure:
It’s not just for dates, but for any use-case where you need to pick one value from across columns!
It’s not just for dates, but for any use-case where you need to pick one value from across columns!
That said, it does show the versality of ggplot!
That said, it does show the versality of ggplot!
Enjoy!
#RStats #Dataviz
Enjoy!
#RStats #Dataviz
It's all about balance and the best solution for your problem🤓
Learn more here:
epirhandbook.com/en/new_pages...
ggplot2.tidyverse.org/reference/ti...
It's all about balance and the best solution for your problem🤓
Learn more here:
epirhandbook.com/en/new_pages...
ggplot2.tidyverse.org/reference/ti...
The example above uses the same colour palette for each plot, with scale_fill_brewer().
For custom colours, you can also define a palette inside scale_fill_manual() - or as a separate object that you refer to (as discussed yesterday).
The example above uses the same colour palette for each plot, with scale_fill_brewer().
For custom colours, you can also define a palette inside scale_fill_manual() - or as a separate object that you refer to (as discussed yesterday).
Why the squiggly brackets {{x}}? 🤔 They're for tidy evaluation!
{{ }} allows ggplot() to recognize the inputs for "xvalue" and "fillvalue" as column names from your data.
Without them, your function won’t know how to evaluate these column names properly!
Why the squiggly brackets {{x}}? 🤔 They're for tidy evaluation!
{{ }} allows ggplot() to recognize the inputs for "xvalue" and "fillvalue" as column names from your data.
Without them, your function won’t know how to evaluate these column names properly!