STOP Wasting Space on HUGE LEGENDS | A ggplot2 step-by-step guide
HTML-код
- Опубликовано: 21 авг 2024
- Traditional color legends suck. They use waaaay too much space. You're better of formatting your subtitle or subtitle accordingly. This even works when you use colors AND symbols. In this video, I show you every step that you need to make this work with ggplot2.
LINK TO FONTAWESOME SEARCH PAGE
fontawesome.co...
LINK TO FONTAWESOME DOWNLOADS
fontawesome.co...
SUPPORT THIS CHANNEL
Sponsor a coffee and help me create better videos at www.buymeacoff...
MORE VIDEOS
📺 Fix labels and understand scale functions in ggplot • Fix labels and underst...
📺 Data wrangling in a single step with across() • Data wrangling in a si...
📺 Fast explainer playlist • Explainer videos
Subscribe at 👉 / @rappa753
MORE CONTENT
- weekly 3-minute newsletter about R, DataViz and webdev at 3mw.albert-rap...
- LinkedIn / albert-rapp-9a5b9b28b
- Twitter / rappa753
#rstats #dataviz #ggplot #dplyr
🥳 If you want to get even better at ggplot and create insightful charts, then you can check out my video course arapp.thinkific.com/courses/insightful-data-visualizations-for-uncreative-r-users
Nicer to put the legend ( subtitle) in the figure caption to save space and better when more levels.
That's also a nice design choice 😲🥳
Masataka Okabe (Jikei Medical School) and Kei Ito (University of Tokyo) color palette
Would be worth it's own package
gg_subtitle_legend
Oh that's a fun idea!
Definitely worth learning. Great tip as always thanks a lot sir
You're very welcome 🤗
In less than 15 minutes, I learned about setting up R studio to handle AGG graphics, adding fonts and moving from geom_point to geom_text while using multiple aesthetics. Incredible!
I try my best to keep my videos short 😁 Super glad that you enjoy these packed videos, Alberto ! 😊
It took me 1 hour to unpack this presentation. So much wisdom is on it. By the way, I failed miserably reproducing the figures in the subtitle. Instead of geometric figures, I got the names of the three of them :0)@@rappa753
fantastic stuff again from Albert!!
Thank you :)
Great video, thanks for sharing! Definitely useful! ;)
Glad that you like it :)
Hi Albert, it was great meeting you at Conf. I found your video super useful and managed to replicate it ... partially. I did it in a Quarto document. When I ran each individual chunk it produced the plot correctly, but when I attempted to render it into its own html, the awesome font stuff broke down. I imagine it has to do with downloading Awesomefont for the desktop vs Awesome for the web. Not sure where the Awesomefont assets need to go. Is my hunch right? Where would I need to place the assets for it to work?
Hi Erwin, glad that you like the video and nice meeting you at Conf ☺ As for the fonts not rendering properly, are you by any chance loading an external package like {thematic} or {ThemePark} inside of your Quarto document? Some package trigger the webfont rendering when loaded inside of a rendered Quarto file. Normally, all of the stuff should work even inside of an HTML file as long as no other package triggers the switch to webfont rendering 🤔
@@rappa753 Hi Albert, thanks for the quick reply. Much appreciated! All the libraries I loaded are: tidyverse, palmerpenguins, ggthemes, glue, and ggtext
@@erwinlares2906 Have you tried going without ggthemes? Just to test if the issue persists.
is the code available anywhere?
I'm trying to find the time to go through all my videos and add a GitHub gist. But I haven't found the time yet.