如何创建包含各个数据点的小提琴图?
下面的代码显示小提琴和彼此相邻的各个数据点;但是,我希望小提琴将这些点包围起来(洋红色箭头),而不是彼此相邻?
import plotly.express as px
df = px.data.tips()
fig = px.violin(df, y="total_bill", box=False, # draw box plot inside the violin
points='all', # can be 'outliers', or False
)
fig.show()
Run Code Online (Sandbox Code Playgroud)