# Bug report / On px.histogram's histnorm parameter

**URL:** <https://community.plotly.com/t/bug-report-on-px-histograms-histnorm-parameter/29092>\
**Category:** 📊 Plotly Python\
**Created:** [September 23, 2019, 8:50am UTC](https://community.plotly.com/t/bug-report-on-px-histograms-histnorm-parameter/29092 "2019-09-23T08:50:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LordFinzenz](https://avatars.discourse-cdn.com/v4/letter/l/e5b9ba/32.png) [@LordFinzenz](https://community.plotly.com/u/LordFinzenz)\
**Post date:** [September 23, 2019, 8:50am UTC](https://community.plotly.com/t/bug-report-on-px-histograms-histnorm-parameter/29092/1 "2019-09-23T08:50:38Z")

</div>

Consider the following toy example:

> import pandas as pd  
> import plotly.express as px
> 
> df\_test = pd.DataFrame([1,1,1,1,2,2,2,3,3,4,4,4,4,4,5,5,5,5,5,5], columns=[‘Test’])  
> fig = px.histogram(df\_test, x=‘Test’, histnorm=None)  
> fig.show()

1. The y-axis is labeled ‘count’ whatever histnorm parameter chosen. I don’t think that should be the case, especially if histnorm=‘percent’ or histnorm=‘probability’.

2. It seems to me that ‘None’ and ‘density’ yield exactly the same graph, can somebody give me an example where it makes a difference? Same for ‘probability’ and ‘probability density’.

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [September 24, 2019, 1:29am UTC](https://community.plotly.com/t/bug-report-on-px-histograms-histnorm-parameter/29092/2 "2019-09-24T01:29:24Z")

</div>

Hello @LordFinzenz

1. It’s True that it would be better to display the name of the `histnorm`, we have an open issue for this [https://github.com/plotly/plotly\_express/issues/122](https://github.com/plotly/plotly_express/issues/122), please bear with us until this is implemented.

2. In your example the bins have a width of 1, hence there is no difference between the two modes (with `density`, the count or histfunc is divided by the width of the bin). With the following example you’ll see a difference

```auto
import pandas as pd
import plotly.express as px
import numpy as np

np.random.seed(0)
df_test = pd.DataFrame(np.random.random(1000), columns=['Test'])
fig = px.histogram(df_test, x='Test', histnorm=None) # change to 'density' here
fig.show()

```
