Marginal plots using ggExtra: Advanced ggplot2 Show raw data with its distribution
HTML-код
- Опубликовано: 15 июл 2024
- #rprogramming #ggplot2 #ggextra #marginalplot #datadistribution #scatterplot
In this video, I have explained plotting marginal plots using ggplot2 and its extension package ggExtra
Marginal plots ar scatter plots with distribution plots on the margin
Scatter plots show relationship but assessing and comparing distribution from scatter is not easy on the eyes.
Marginal plots help the audience to see and compare distributions without any effort.
The marginal plots can be any of the distribution plot- densityplot, histogram, boxplot, violin plot or densigram. Densigram is a combination of histogram and densityplot.
code
install.packages("ggExtra")
library(ggExtra)
library(ggplot2)
str(iris)
p = ggplot(iris,aes(Sepal.Length,Sepal.Width,color=Species))+
geom_point()+
theme_bw()+
theme(legend.position = "bottom")+
geom_smooth()
ggMarginal(p,groupColour = TRUE,groupFill = TRUE,type="density")
Facebook page:
/ rajendrachoureisc
Mail Id:
rajuchoure@gmail.com
youtube playlist:
• R programming tutorials
Your all videso are very helpful.
If possible please make a video on forest plot from metafor package by ggplot2
Thanks for good words I will make that video.
well done sir, I have doctorate degree in Agriculture, always follow your videos. But do you have any plan to have some videos on “RNA-seq analysis with R”? it will be very helpful for many people
Trying to do that. I am learning that fir my own work.
Thank you so much. I am trying to learn R plotting. While running the groupColour code I get the error message 'The `groupColour` theme element is not defined in the element
hierarchy'. Am I missing something?
If possible share your code.
@@DevResearch I overwrote with the code you provided at the comment section.
Nice job, but how do you calculate the significance and include them into the plot? I mean when generating the boxplot.
You can use stats_compare_means() from ggpubr with the ggplot.
ruclips.net/video/Bx0h4Vm--jM/видео.html