#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()+
theme(ggside.panel.scale=0.3, legend.position = "bottom")
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()+
theme(ggside.panel.scale=0.3, legend.position = "bottom")
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()+
theme(ggside.panel.scale=0.3, legend.position = "bottom")
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()+
theme(ggside.panel.scale=0.3, legend.position = "bottom")
Facebook page:
/ rajendrachoureisc
Mail Id:
rajuchoure@gmail.com
youtube playlist:
• R programming tutorials
On this page of the site you can watch the video online Enhanced scatterplot : Side plots in ggplot2 using geom_*side^() of ggside package with a duration of hours minute second in good quality, which was uploaded by the user Rajendra Choure 19 May 2023, share the link with friends and acquaintances, this video has already been watched 384 times on youtube and it was liked by 13 viewers. Enjoy your viewing!