Multi-Panel Plots in R (using ggplot2)

Поділитися
Вставка
  • Опубліковано 7 лип 2024
  • Hi everyone, this video discusses how to create multi-panel plots in ggplot2 as well as combine multiple plots into one figure using ggarrange. There is also a bonus section at the end addressing a question in the comments, which explains how to create a graph with more than one trend line and a matching numbers of legends. Please find the timestamps listed below:
    0:00 - Introduction
    0:09 - Mult-Panel Plots (Facet_grid() and Facet_wrap())
    5:55 - Multiple Plots in one Figure (ggarrange() from package ggpubr)
    9:31 - BONUS - Addressing UA-cam commnet about including multiple trend lines and legends in one graph including R^2 coefficient.

КОМЕНТАРІ • 24

  • @richardkamwezi9297
    @richardkamwezi9297 3 роки тому +13

    Helpful video. One thing that sort of confused me was that I initially thought that the ggarrange() function was part of ggplot2 when it rather is a function of the ggpubr package. It is my first time hearing about that package and I know that may be the case with others who come to this video.
    Thanks for sharing this.

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

      Hey thank you so much for pointing this out! I will try to update it so that it’s clear that you need to have the ggpubr package installed.

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

      Thanks for pointing this out!

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

    Thank you for sharing this! That helps me a lot in creating beautiful graphs for my project. Keep up the great work!

  • @pandabareO_o
    @pandabareO_o 10 місяців тому +1

    this was so easy to follow, I wish you were my lecturer gg
    I rate this 9/10 bananas

  • @buffaloperformanceandanaly1431

    Great video! Very easy to understand and follow. Thanks for sharing!

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

    Awesome, thank you!

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

    This is so useful thanks

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

    Thank you so much for the video! It really helped me!

  • @lucastheodori7370
    @lucastheodori7370 2 роки тому

    Thank you for nice lab,

  • @mocabeentrill
    @mocabeentrill Рік тому

    Top shelf stuff!

  • @klews7867
    @klews7867 9 місяців тому

    thank you!

  • @ahmed007Jaber
    @ahmed007Jaber 2 роки тому

    thank you for this. what if I have more than 100 products and want to visualise their sales to pick on any apparent trend???

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

    Hi, this is amazing video. I tried and successfully made initial graph. I am unable to relate If we have time steps values .. I mean How can we make panel data graphs following the same steps? I have data for 1000 time steps values of 150 agents. As total of 150 (small, medium and large )farmers with distance from water source use surface water over the period of 1000 steps. How to see effect of time in it? Please guide!

  • @takelezike7061
    @takelezike7061 2 роки тому

    Interesting video! can I get the syntax?

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

    Hi, nice vid! But I’m still a bit confused on the subsetting the diamonds data.... what is it used for?

    • @peelingbackdata3907
      @peelingbackdata3907  3 роки тому +2

      Hi, glad you enjoyed the video! I just decided to subset the diamonds data so that it was easier to work with and demonstrate these techniques. When there are less data points the plots load much quicker, and seeing some of the trends is a bit easier I find. On a real-world dataset I wouldn’t recommend subsetting it unless you had a good reason to.

  • @aislinncitlaliperezmorales9907

    tengo que instalar el paquete ggarrange? me dice que no encuentra la función con ggplot2

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

    Can we get the code? Thanks much!

  • @bhavyagudhka7259
    @bhavyagudhka7259 Рік тому

    how to use ggarrange in a for loop

  • @leonardofwink
    @leonardofwink Рік тому

    nossa, muito dificil de entender o código.. se tivesse separado por argumento seria mais fácil.. claro que o código funciona assim, mas não é facilmente lido por nós humanos

  • @dani08sv
    @dani08sv 2 роки тому +2

    Nothing is working, ggarrange() is not even a function in the ggplo2 package, you need to install ggpubr, and even then you still cant use ggarrage(). And what about multi panel plot 2 plots of any type? not just ggplots, this is not usefull, and you dont even explain what the functions do.

    • @bepppi
      @bepppi Рік тому

      Yeah read a book buddy