【发布时间】:2023-01-05 22:58:16
【问题描述】:
我想使用 plotly 的分布函数来强调一个变量相对于其他变量的行为,所以我只希望这条是实线,而其余的是虚线。例如,在这个情节示例中:
import plotly.figure_factory as ff
import numpy as np
x1 = np.random.randn(200) - 1
x2 = np.random.randn(200)
x3 = np.random.randn(200) + 1
hist_data = [x1, x2, x3]
group_labels = ['Group 1', 'Group 2', 'Group 3']
colors = ['#333F44', '#37AA9C', '#94F3E4']
# Create distplot with curve_type set to 'normal'
fig = ff.create_distplot(hist_data, group_labels, show_hist=False, colors=colors, show_rug =False)
fig.show()
如何使第 2 组和第 3 组的线变为虚线?
【问题讨论】: