R programming: Interactive plots with ggplotly

Published: 11 September 2021
on channel: Rajendra Choure
1,142
21

plotly library provides ggplotly function, which makes each ggplot interactive. Mo e the mouse over plot you will see the data specific to that part of plot. The tooltip behavior can also be controlled.
#rprogramming
#datavisualisation
#interactiveplots
#ggplot2
#ggplotly

code for learning purpose
library(ggplot2)
library(plotly)

bp= ggplot(iris,aes(Species,Sepal.Length, fill=Species))+
geom_boxplot()+
ggtitle("Boxplot")
bp


sp= ggplot(iris,aes(Sepal.Length,Petal.Length, color=Species))+
geom_point()+
ggtitle("Scatter plot")
sp

dp = ggplot(iris,aes(Sepal.Length, fill=Species))+
geom_density(color="black",alpha=0.5)+
ggtitle("Density plot")
dp


ggplotly(bp)


On this page of the site you can watch the video online R programming: Interactive plots with ggplotly with a duration of hours minute second in good quality, which was uploaded by the user Rajendra Choure 11 September 2021, share the link with friends and acquaintances, this video has already been watched 1,142 times on youtube and it was liked by 21 viewers. Enjoy your viewing!