Це відео не доступне.
Перепрошуємо.

Creating a barplot with error bars using ggplot2 (CC088)

Поділитися
Вставка
  • Опубліковано 7 сер 2024
  • In this episode of Code Club, Pat shows how to create a barplot with error bars using the geom_col and geom_errorbar functions from ggplot2. Along the way, he'll discuss the problems with bar plots and why these graphs are best avoided.
    Pat will use RStudio and functions from the ggplot2 package and other packages from the tidyverse. The accompanying blog post can be found at www.riffomonas.org/code_club/....
    Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance!
    If you're interested in taking an upcoming 3 day R workshop, email me at riffomonas@gmail.com!
    PLOS Biology article on barplots: journals.plos.org/plosbiology...
    R: r-project.org
    RStudio: rstudio.com
    Raw data: github.com/riffomonas/raw_dat...
    Workshops: www.mothur.org/wiki/workshops
    You can also find complete tutorials for learning R with the tidyverse using...
    Microbial ecology data: www.riffomonas.org/minimalR/
    General data: www.riffomonas.org/generalR/
    0:00 Introduction
    2:23 Critiquing an old figure
    7:33 Recreating old figure
    11:20 Improving appearance of figure
    18:07 Add N to labels
    21:00 Conclusion

КОМЕНТАРІ • 24

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

    Be sure to check out the PLOS Biology article I mentioned. What do you think of their arguments? journals.plos.org/plosbiology/article?id=10.1371%2Fjournal.pbio.1002128

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

    I highly appreciate your tutorial, professor. My sincere gratitude for the lesson you have shared with us. Greetings from Mexico.

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

      My pleasure! Thanks for watching 😊

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

    great tip using the ggtext for the markdown in the axis, learning a ton with your videos!

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

      Thanks! I’ve really grown to love ggtext and glue for this type of stuff

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

    Great video, thanks! Recently I have been thinking about how to overcome this issue with barplots in my own figures - currently I am making boxplots with geom_point overlaid to better demonstrate the distribution of the samples, but when I have figures with a lot of data points it can look a bit messy and harder to interpret. Looking forward to a future episode on bar plot alternatives!

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

      Hey Grace - I agree. It isn’t easy and there’s probably no perfect choice for larger datasets ... but I think most are better than bar charts with +/- se 😂

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

    Excellent tutorial the element.markdown feature is really cool and handy!

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

      It's great, isn't it?! I think it's also going to be super handy for things like bacterial names on axes

  • @md.masumbillah8222
    @md.masumbillah8222 2 роки тому +1

    Thanks, absolutely useful to analyze and visualize my data related to the macro faunal abundance in a lagoon system.

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

    Now I know how to fix a broken barplot.Glue it. :)THANK YOU VERY MUCH.

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

    Dude, most of my master's degree has been online due to Covid. You're helping me a great deal with these tutorials and your posts on the Mothur forum! Stoked to see what you recommend instead. Maybe errorplots?

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

      Ugh, that's brutal! Glad to be able to help out. The next 3-4 episodes will be alternatives so stay tuned :)

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

    Thank you for this!! Very informative.

  • @HanySalem
    @HanySalem 10 місяців тому

    great@

  • @commomscience
    @commomscience Рік тому +1

    There is a space between the x axis line and bins; how to get rid of this space?

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

      Thanks for watching! You can use expand=c(0,0) in scale_y_continuous

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

    Totally agree with you, I do not like bar plot either. But the real problem is the original data they use, very less chance to get them even by a kind ask with an email. Open science and reproducible research is still a long way to go.

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

    Thanks Pat. I just think that SE is not the right thing to show in dinamite plots (that already aren't a great plot for means). SE is the standard deviation of the means of samples taken form the same population, so, it is not appropriate to show the variation for 1 single (or pooled) sample. Don't you agree?

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

    Can I talk with you about my plot?