Positioning and formatting a legend using the ggplot2 R package (CC141)

Поділитися
Вставка
  • Опубліковано 8 жов 2024

КОМЕНТАРІ • 9

  • @Riffomonas
    @Riffomonas  3 роки тому +1

    Now that I've recreated the chartr version of the chart, what do you think of it? Remember, for everything you don't like you have to say something that you do like about it!

  • @russtin1
    @russtin1 3 роки тому +1

    I would love to see a code club doing a deep dive like this on regexpr . They are a steep learning curve for us muggles.

    • @Riffomonas
      @Riffomonas  3 роки тому

      Thanks - this is on the top of the list. I need a practical application for doing a survey of regular expression patterns. I really want to avoid the traditional tutorial type demos

  • @soyoungsogone
    @soyoungsogone 3 роки тому +1

    Fixing that detail on 7:12 is a major test of mental strength.
    Thank you, ryan reynolds with an r addiction, for this series, the value is off the chart (don't try to fix it)

    • @Riffomonas
      @Riffomonas  3 роки тому +1

      HA! Thanks :) You'll be grateful that I spared everyone my numerous practice runs at trying to fix this. A lot of "what are you doing, R?" 😂

  • @philocac5424
    @philocac5424 2 роки тому +1

    Thank you, very helpful (as your other videos)! I was struggling with the margin inside the legend box (and making a black box around it).
    it works also using this argument:
    legend.margin=margin(t=-3, r=2, b=2, l=2)
    then, I tried out your version (then I needed slightly different margin numbers)
    legend.text = element_markdown(margin=margin(t=-5, r=2, b=1, l=2)
    my full theme() - if someone is interested... (probably some things could be improved, ggplot newbie.., but at least it does what I want and spent already enough time) :)
    theme(legend.position = c(.83, .85),
    legend.text = element_markdown(margin=margin(t=-5, r=2, b=1, l=2)),
    legend.title = element_blank(),
    plot.title = element_text(size = 12),
    plot.subtitle = element_text(size = 10),
    legend.key.size = unit(0.4, "cm"),
    panel.grid.major = element_line(size=0.25),
    legend.background = element_rect(fill = "white", colour = "black"),
    plot.margin=unit(c(0,0,0,0), "mm"))#,
    # legend.margin=margin(t=-3, r=2, b=2, l=2))

  • @drjzee
    @drjzee 3 роки тому +1

    I regularly get confused by the order in recode too - I think rename is the other way around from recode (so new name on the left).

    • @Riffomonas
      @Riffomonas  3 роки тому

      For one of them their help page/issue tracker made it seem that the developers want to do something about it but they aren’t sure what 🤷‍♂️😂