Enhanced scatterplot : Side plots in ggplot2 using geom_*side^() of ggside package

preview_player
Показать описание
#rprogramming #datavisualization #ggplot2 #ggside #sideplots #marginalplots

In this video I have demonstrated the use of geom_^side^ to get different side plots to enhance scatterplot by showing the distribution of the numeric variable.

#code

library(ggside)

head(iris)

library(ggplot2)

ggplot(iris,aes(Sepal.Length,Petal.Length,fill=Species, color=Species))+
geom_point()+
geom_xsideboxplot()+
geom_ysidedensity(alpha=0.3)+
theme_classic()+

ggplot(iris,aes(Sepal.Length,Petal.Length,fill=Species, color=Species))+
geom_point()+
geom_xsidebar(alpha=0.3)+
geom_ysidehistogram(alpha=0.3)+
theme_classic()+

library(ggside)

head(iris)

library(ggplot2)

ggplot(iris,aes(Sepal.Length,Petal.Length,fill=Species, color=Species))+
geom_point()+
geom_xsideboxplot()+
geom_ysidedensity(alpha=0.3)+
theme_classic()+

ggplot(iris,aes(Sepal.Length,Petal.Length,fill=Species, color=Species))+
geom_point()+
geom_xsidebar(alpha=0.3)+
geom_ysidehistogram(alpha=0.3)+
theme_classic()+

Facebook page:

Mail Id:

youtube playlist:
Рекомендации по теме
visit shbcf.ru