10.8 提琴图

# 提琴图
p24 <- plot_ly(sleep,
   x = ~group, y = ~extra, split = ~group, type = "violin",
   box = list(visible = T),
   meanline = list(visible = T)
)

htmltools::tagList(p21, p22, p23, p24)

plotly 包含图层 27 种,见表 10.2

表 10.2: 图层
A B C
add_annotations add_histogram add_polygons
add_area add_histogram2d add_ribbons
add_bars add_histogram2dcontour add_scattergeo
add_boxplot add_image add_segments
add_choropleth add_lines add_sf
add_contour add_markers add_surface
add_data add_mesh add_table
add_fun add_paths add_text
add_heatmap add_pie add_trace