Skip to content

Commit f13a408

Browse files
committed
make _grid_ref and _grid_str attributes
1 parent 9a2767b commit f13a408

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plotly/graph_objs/graph_objs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ def __init__(self, *args, **kwargs):
922922

923923
def print_grid(self):
924924
try:
925-
grid_str = self['_grid_str']
925+
grid_str = self._grid_str
926926
except KeyError:
927927
raise Exception("Use tools.make_subplots "
928928
"to create a subplot grid.")
@@ -931,7 +931,7 @@ def print_grid(self):
931931

932932
def append_trace(self, trace, row, col):
933933
try:
934-
grid_ref = self['_grid_ref']
934+
grid_ref = self._grid_ref
935935
except KeyError:
936936
raise Exception("In order to use Figure.append_trace, "
937937
"you must first use tools.make_subplots "

plotly/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,8 +1087,8 @@ def _pad(s, cell_len=cell_len):
10871087

10881088
fig = graph_objs.Figure(layout=layout)
10891089

1090-
fig['_grid_ref'] = grid_ref
1091-
fig['_grid_str'] = grid_str
1090+
fig._grid_ref = grid_ref
1091+
fig._grid_str = grid_str
10921092

10931093
return fig
10941094

0 commit comments

Comments
 (0)