Using the the ggplot2 R package to create a boxplot with individual data points overlayed (CC091)

preview_player
Показать описание
A boxplot shows the median of a distribution along with the 25th and 75th percentiles as well as an indicator of which points are outliers. In this episode of Code Club, Pat will use ggplot2 with the geom_boxplot, geom_jitter, and stat_summary functions to create a boxplot with the individual data overlayed on the figure.

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!

You can also find complete tutorials for learning R with the tidyverse using...

0:00 Introduction
1:37 Creating box and whisker plot
6:34 Adjusting appearance of plot with alpha
8:15 Overlaying jittered data
11:00 Changing length of whiskers with coef
13:29 Replacing geom_boxplot with stat_summary
16:47 Critique of figure
18:36 Conclusion

#ggplot2 #geom_boxplot #geom_jitter #stat_summary
Рекомендации по теме
Комментарии
Автор

What do you think of adding a boxplot to a jitter plot without including the whiskers?

Riffomonas
Автор

Absolutely love your videos! Keep up the great work

TheSandrao
Автор

I would have thought it was a 95% CI, so I learned something there.

drjzee
Автор

Really interesting !!! Many thanks !
I think I will use jitter plot with box plot for my next analyses. But I will keep the whiskers, without you miss the extreme values ... I'm not sure it is really important to explain the 1.5 times about whiskers, I think it is enough to say that above or below we consider the values as extreme.
Thanks again, even if do not agree for whiskers I really appreciate your point, an I always learn new things !

cyrillejar
Автор

Hi Pat, does the position of the jittered points change each time you run the code or itmust be fixed at each code-run?

hassanhijazi
Автор

Hi Pat, is it possible to pin the number as you have shown for the x-axis labels for the Titles and subtitles, and captions. Thank you

KN-txsd
Автор

Hi Pat, is it possible to reduce the space between the two x-labels so the plots are near to each other.

KN-txsd
Автор

Hello!! can i get a sentence for drawing Boxplot without min and max? just a box without a line!
I know you explained it but English is not my first language so it's kind of hard to understand the whole thing...

조지수-bq
Автор

How to fix some error,
library("tidyverse")
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘cli’ 3.1.0 is already loaded, but >= 3.4.0 is required
In addition: Warning message:
package ‘tidyverse’ was built under R version 4.1.3

erdenebilegnasantogtokh
Автор

how to do Box and Whisker Plot in R?? Please Urgent 🙏😭

The_Researcher_Girl_Aditi
Автор

Yeah, I thought the whisker was the entire range....

valerierussell
Автор

is it possible to do it in excel.please make a video.combining jitter plot with box plot in excel.thanks

mdmominulislam