Histograms
Contents
Histograms#
Documentation:
https://plotly.com/python/histograms/
https://plotly.com/python-api-reference/generated/plotly.express.histogram.html
import plotly.express as px
Continuous x axis#
tips_df = px.data.tips()
tips_df.head()
total_bill | tip | sex | smoker | day | time | size | |
---|---|---|---|---|---|---|---|
0 | 16.99 | 1.01 | Female | No | Sun | Dinner | 2 |
1 | 10.34 | 1.66 | Male | No | Sun | Dinner | 3 |
2 | 21.01 | 3.50 | Male | No | Sun | Dinner | 3 |
3 | 23.68 | 3.31 | Male | No | Sun | Dinner | 2 |
4 | 24.59 | 3.61 | Female | No | Sun | Dinner | 4 |
tips_fig = px.histogram(
data_frame=tips_df,
x='tip',
)
tips_fig