You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: notebooks/horizontal-bar-charts.md
+37-4Lines changed: 37 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -34,23 +34,56 @@ jupyter:
34
34
permalink: python/horizontal-bar-charts/
35
35
thumbnail: thumbnail/horizontal-bar.jpg
36
36
title: Horizontal Bar Charts | plotly
37
+
v4upgrade: true
37
38
---
38
39
39
40
See more examples of bar charts (including vertical bar charts) and styling options [here](https://plot.ly/python/bar-charts/).
40
41
41
42
43
+
### Horizontal Bar Chart with plotly express
44
+
45
+
Plotly express functions take as argument a tidy [pandas DataFrame](https://pandas.pydata.org/pandas-docs/stable/getting_started/10min.html). For a horizontal bar char, use the `px.bar` function with `orientation='h'`.
46
+
47
+
48
+
#### Basic Horizontal Bar Chart with plotly express
When data are not available as a tidy dataframe, you can use the more generic function `go.Bar` from `plotly.graph_objs`. All the options of `go.Bar` are documented in the reference https://plot.ly/python/reference/#bar
0 commit comments