Skip to content

Commit 46b6c73

Browse files
committed
fill in a layout obj, not a figure obj directly
1 parent 254cf13 commit 46b6c73

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plotly/tools.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,8 @@ def _checks(item, defaults):
788788
# [grid_ref] Initialize the grid and insets' axis-reference lists
789789
grid_ref = [[None for c in range(cols)] for r in range(rows)]
790790
insets_ref = [None for inset in range(len(insets))] if insets else None
791-
fig = dict(layout=graph_objs.Layout()) # init layout object
791+
792+
layout = graph_objs.Layout() # init layout object
792793

793794
# Function handling logic around 2d axis labels
794795
# Returns 'x{}' | 'y{}'
@@ -1021,7 +1022,8 @@ def _add_domain_is_3d(fig, s_cnt, x_domain, y_domain):
10211022
grid_str[inset['cell'][0]][inset['cell'][1]])
10221023
print('')
10231024

1024-
return graph_objs.Figure(fig) # forces us to validate what we just did...
1025+
fig = graph_objs.Figure(layout=layout)
1026+
return fig
10251027

10261028

10271029
def get_valid_graph_obj(obj, obj_type=None):

0 commit comments

Comments
 (0)