Skip to content

Commit e2e6bb9

Browse files
committed
Implicitly create graph_objs in make_subplots.
The `__init__` method ends up doing some additional validation, it’s more performant (and exactly the same), to set an item in layout as a dict instead of as a *graph_obj*.
1 parent 1061b24 commit e2e6bb9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plotly/tools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,8 +1000,7 @@ def _get_anchors(r, c, x_cnt, y_cnt, shared_xaxes, shared_yaxes):
10001000
# Function pasting x/y domains in layout object (2d case)
10011001
def _add_domain(layout, x_or_y, label, domain, anchor, position):
10021002
name = label[0] + 'axis' + label[1:]
1003-
graph_obj = '{X_or_Y}Axis'.format(X_or_Y=x_or_y.upper())
1004-
axis = getattr(graph_objs, graph_obj)(domain=domain)
1003+
axis = {'domain': domain}
10051004
if anchor:
10061005
axis['anchor'] = anchor
10071006
if isinstance(position, float):

0 commit comments

Comments
 (0)