Introduction to the plotly Package in R (Example) | Draw Interactive Plots | Create Web-Based Graphs

preview_player
Показать описание
R code of this video:

df <- mtcars

library(plotly)

plot_ly(
data = df,
x = ~cyl,
y = ~disp
)

plot_ly(
data = df,
x = ~cyl,
y = ~disp,
type = "scatter",
mode = "markers"
)

plot_ly(
data = df,
x = ~cyl,
y = ~disp,
color = ~factor(cyl),
type = "scatter",
mode = "markers"
)

plot_ly(
data = df,
x = ~cyl,
y = ~disp,
color = ~factor(cyl),
text = ~name,
type = "scatter",
mode = "markers"
)

fig <- ggplot2::ggplot(data = df, aes(x=cyl, y=disp)) + geom_point(aes(color = factor(cyl)))
ggplotly(fig)

Follow me on Social Media:
Рекомендации по теме
Комментарии
Автор

thank you so much both the presenter and the instructor. Super nice of you to share your knowledge.

nkunam
Автор

Thank you both for taking the time to demonstrate this capability.

pcsksa
Автор

Great work! Really useful and well explained. More on plotly if possible please.

macanbhaird
Автор

Thanks for ur useful videos 🤩good continuation 😊🌺

chamcoral
Автор

That's really good stuff for science data visualization. It can be useful in very different ways in genetics and covid studies.

trilisser
Автор

Thank you so much for this great video, it's really informative!

fabiodagostino
Автор

Hi sir, I am studying M.sc statistics your videos are helping me in studies. I need your help in choosing topic for my project sir. Pls tell me which is best and useful for my future career.

sabarikrishna