这是迄今为止我使用 Plotly 和 iPython 创建的条形图。显然这很难阅读。我想要做的是在 x 轴上创建箱。例如,为 0-50 的 x 值创建 1 个总 y 值。和50-100。等等。
这可以使用 matplotlib 或 Plotly 完成吗?
剧情代码:
data = Data([
Bar(
x=[tuples[0] for tuples in tuples_list],
y=[tuples[1] for tuples in tuples_list]
)
])
layout = dict(
title='Public Video Analysis',
yaxis=YAxis(
title = 'Views'),
xaxis1=XAxis(
title = "Duration in Seconds"),
)
fig = Figure(data=data, layout=layout)
py.iplot(fig)