tips = px.data.tips()
tips.head()Exploratory analysis
MADS6
2026-03-04
plotly’s main chart typesThe plotly library is an interactive, open-source plotting library that supports over 40 unique chart types covering a wide range of statistical, financial, geographic, scientific, and 3-dimensional use-cases.
Built on top of the Plotly JavaScript library (plotly.js), plotly enables Python users to create beautiful interactive web-based visualizations that can be displayed in Jupyter notebooks, saved to standalone HTML files, or served as part of pure Python-built web applications using Dash.
Food servers’ tips in restaurants may be influenced by many factors, including the nature of the restaurant, size of the party, and table locations in the restaurant.

In one restaurant, a food server recorded the following data on all customers they served during an interval of two and a half months in early 1990.
| 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 |
Plotly histograms will automatically bin numerical or date data.
The default mode is to represent the count of samples in each bin.
With the histnorm argument, it is also possible to represent the percentage or fraction of samples in each bin (histnorm='percent' or 'probability').
We learned to
Contributions
Izabela Ferreira da Silva (Original author)
Other materials