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
460460
461461``` python
462462import plotly.express as px
463- import pandas as pd
464463
465464df = 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
You can’t perform that action at this time.
0 commit comments