Plotly-express-15-plotly实现水平柱状图(h)
本文中介绍的是如何在plotly中实现水平方向的柱状图:
- px.bar(oritention=“h”)
- go.Bar(oritention="h)
Horizontal Bar Chart with Plotly Express
demo
1 | import plotly.express as px |
Configure horizontal bar chart
In this example a column is used to color the bars, and we add the information from other columns to the hover data.
1 | import plotly.express as px |
Horizontal Bar Chart with go.Bar
demo
1 | import plotly.graph_objects as go |
Colored Horizontal Bar Chart
1 | import plotly.graph_objects as go |
Color Palette for Bar Chart
1 | import plotly.graph_objects as go |