File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44
55## [ 4.13.0] - UNRELEASED
66
7+ ### Added
8+
9+ - ` go.Figure ` now has a ` set_subplots ` method to set subplots on an already
10+ existing figure.
711
812
913## [ 4.12.1] - UNRELEASED
Original file line number Diff line number Diff line change @@ -581,6 +581,26 @@ fig = go.Figure(data=data, layout=layout)
581581fig.show()
582582```
583583
584+ #### Setting Subplots on a Figure Directly
585+
586+ _ new in 4.13_
587+
588+ Subplots can be added to an already existing figure, provided it doesn't already
589+ have subplots. ` go.Figure.set_subplots ` accepts all the same arguments as
590+ ` plotly.subplots.make_subplots ` .
591+
592+ ``` python
593+ import plotly.graph_objects as go
594+ fig = go.Figure().set_subplots(2 , 3 , horizontal_spacing = 0.1 )
595+ ```
596+
597+ is equivalent to:
598+
599+ ``` python
600+ from plotly.subplots import make_subplots
601+ fig = make_subplots(2 , 3 , horizontal_spacing = 0.1 )
602+ ```
603+
584604#### Reference
585605All of the x-axis properties are found here: https://plotly.com/python/reference/XAxis/
586606All of the y-axis properties are found here: https://plotly.com/python/reference/YAxis/
You can’t perform that action at this time.
0 commit comments