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

Комментарии • 22

  • @rappa753
    @rappa753  8 месяцев назад

    🥳 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

  • @rossd6809
    @rossd6809 Месяц назад +1

    Nicer to put the legend ( subtitle) in the figure caption to save space and better when more levels.

    • @rappa753
      @rappa753  Месяц назад

      That's also a nice design choice 😲🥳

  • @DM-py7pj
    @DM-py7pj 3 месяца назад +1

    Masataka Okabe (Jikei Medical School) and Kei Ito (University of Tokyo) color palette

  • @hgd4878
    @hgd4878 10 месяцев назад +5

    Would be worth it's own package

    • @hgd4878
      @hgd4878 10 месяцев назад +1

      gg_subtitle_legend

    • @rappa753
      @rappa753  10 месяцев назад

      Oh that's a fun idea!

  • @Aaqib..
    @Aaqib.. 10 месяцев назад +3

    Definitely worth learning. Great tip as always thanks a lot sir

    • @rappa753
      @rappa753  10 месяцев назад

      You're very welcome 🤗

  • @albertocabrera4297
    @albertocabrera4297 10 месяцев назад +1

    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!

    • @rappa753
      @rappa753  10 месяцев назад

      I try my best to keep my videos short 😁 Super glad that you enjoy these packed videos, Alberto ! 😊

    • @albertocabrera4297
      @albertocabrera4297 10 месяцев назад +2

      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

  • @onkar7651
    @onkar7651 10 месяцев назад +1

    fantastic stuff again from Albert!!

    • @rappa753
      @rappa753  10 месяцев назад +1

      Thank you :)

  • @kanahia7460
    @kanahia7460 10 месяцев назад +1

    Great video, thanks for sharing! Definitely useful! ;)

    • @rappa753
      @rappa753  10 месяцев назад

      Glad that you like it :)

  • @erwinlares2906
    @erwinlares2906 8 месяцев назад

    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?

    • @rappa753
      @rappa753  8 месяцев назад +1

      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 🤔

    • @erwinlares2906
      @erwinlares2906 8 месяцев назад +1

      @@rappa753 Hi Albert, thanks for the quick reply. Much appreciated! All the libraries I loaded are: tidyverse, palmerpenguins, ggthemes, glue, and ggtext

    • @rappa753
      @rappa753  8 месяцев назад

      @@erwinlares2906 Have you tried going without ggthemes? Just to test if the issue persists.

  • @charliebarker7727
    @charliebarker7727 10 месяцев назад +1

    is the code available anywhere?

    • @rappa753
      @rappa753  10 месяцев назад

      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.