【发布时间】:2021-09-01 21:53:27
【问题描述】:
我在文档中找不到这个。 plotly Graphing Libraries 有以下示例,但似乎没有解释其论点。
import plotly.express as px
df = px.data.tips()
fig = px.histogram(df, x="total_bill", nbins=20)
fig.show()
从情节来看,它看起来不像垃圾箱的数量。它既不反映 bin 值区间,也不反映每个 bin 中的计数。 nbins=20 是什么意思?
【问题讨论】:
-
这能回答你的问题吗? How to choose bins in matplotlib histogram
-
嗨@yudhiesh 感谢您的链接。是的,我想是的,杰克的回答解释了
The bins parameter tells you the number of bins that your data will be divided into.,但在我上传的情节中似乎并非如此。那么这是一个错误吗?