library(plotly)
packageVersion('plotly')
library(plotly)
df <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv")
p <- df %>%
plot_ly(
y = ~total_bill,
type = 'violin',
box = list(
visible = T
),
meanline = list(
visible = T
),
x0 = 'Total Bill'
) %>%
layout(
yaxis = list(
title = "",
zeroline = F
)
)
# Create a shareable link to your chart
# Set up API credentials: https://plot.ly/r/getting-started
chart_link <- api_create(p, filename = "violin-basic")
chart_link