File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -460,13 +460,18 @@ Histogram bars can also be sorted based on the ordering logic of the categorical
460
460
461
461
``` python
462
462
import plotly.express as px
463
- import pandas as pd
464
463
465
464
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()
470
475
```
471
476
472
477
#### Reference
You can’t perform that action at this time.
0 commit comments