Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c4b1f5 commit f724e3bCopy full SHA for f724e3b
doc/python/histograms.md
@@ -460,13 +460,18 @@ Histogram bars can also be sorted based on the ordering logic of the categorical
460
461
```python
462
import plotly.express as px
463
-import pandas as pd
464
465
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()
+fig = px.histogram(df, x="day").update_xaxes(categoryorder='total ascending')
+fig.show()
+```
+
+```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
475
```
476
477
#### Reference
0 commit comments