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
#### Adding Autoshapes to Multiple Facets / Subplots
89
+
Extra formatting of the annotation can be done using magic-underscores prefixed by `annotation_` or by passing a `dict` or `go.layout.Annotation` instance to the `annotation` argument:
72
90
73
-
The same line or box can be added to multiple facets by using the `'all'`
74
-
keyword in the `row` and `col` arguments like with `Figure.add_shape`. For
annotation=dict(font_size=20, font_family="Times New Roman"),
105
+
fillcolor="green", opacity=0.25, line_width=0)
87
106
fig.show()
88
107
```
89
-
The default `row` and `col` values are `"all"` so
90
-
`fig.add_vline(x=30, line_color="purple")` is equivalent
91
-
to `fig.add_vline(x=30, row="all", col="all", line_color="purple")` in the above
92
-
example.
93
108
94
-
#### Adding Text Annotations to Autoshapes
109
+
#### Adding to Multiple Facets / Subplots
95
110
96
-
Text [annotations](/python/text-and-annotations) can be added to an autoshape
97
-
using the `annotation` keyword. Using the above example:
111
+
The same line or box can be added to multiple [subplots](/python/subplots/) or [facets](/python/facet-plots/) by setting the `row` and/or `col` to `"all"`. The default `row` and `col` values are `"all"`.
Call `help` on any of the autoshape functions in the Python interpreter to learn
121
-
more (e.g., `help(fig.add_vline)`).
125
+
### Reference
126
+
127
+
More details are available about [layout shapes](/python/shapes/) and [annotations](/python/text-and-annotations).
128
+
129
+
Reference documentation is also available for [`add_hline`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html?highlight=add_hline#plotly.graph_objects.Figure.add_hline), [`add_vline`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html?highlight=add_vline#plotly.graph_objects.Figure.add_vline), [`add_hrect`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html?highlight=add_hrect#plotly.graph_objects.Figure.add_hrect), [`add_vrect`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html?highlight=add_vrect#plotly.graph_objects.Figure.add_vrect).
0 commit comments