简体   繁体   中英

Plot a density histogram with Plotly

I'm looking for a way to plot a density histogram with Plotly. As a density=True with a numpy histogram. My variable is a continuous one from 0 to 20. I already have a count on yaxis with bins. So I'm looking for replace theses counts by percentage (o density).

Give a try using the layout option:

layout = go.Layout(yaxis=dict(tickformat=".2%"))

You can see this question kind of duplicated here

试试这个:

go.Histogram(x=some_vec, histnorm="probability density")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM