Skip to content

Commit f724e3b

Browse files
doc tweak
1 parent 1c4b1f5 commit f724e3b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

doc/python/histograms.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -460,13 +460,18 @@ Histogram bars can also be sorted based on the ordering logic of the categorical
460460

461461
```python
462462
import plotly.express as px
463-
import pandas as pd
464463

465464
df = px.data.tips()
466-
fig1 = px.histogram(df, x="day").update_xaxes(categoryorder='total ascending')
467-
fig2 = px.histogram(df, x="day", color="smoker").update_xaxes(categoryorder='total descending')
468-
fig1.show()
469-
fig2.show()
465+
fig = px.histogram(df, x="day").update_xaxes(categoryorder='total ascending')
466+
fig.show()
467+
```
468+
469+
```python
470+
import plotly.express as px
471+
472+
df = px.data.tips()
473+
fig = px.histogram(df, x="day", color="smoker").update_xaxes(categoryorder='total descending')
474+
fig.show()
470475
```
471476

472477
#### Reference

0 commit comments

Comments
 (0)