Skip to content

Commit 0437513

Browse files
committed
add print_grid method to Figure
1 parent 6b2465b commit 0437513

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plotly/graph_objs/graph_objs.py

+10
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,16 @@ def __init__(self, *args, **kwargs):
919919
kwargs['layout'] = Layout()
920920
super(Figure, self).__init__(*args, **kwargs)
921921
Figure.__init__ = __init__ # override method!
922+
923+
def print_grid(self):
924+
try:
925+
grid_str = self['_grid_str']
926+
except KeyError:
927+
raise Exception("Use tools.make_subplots "
928+
"to create a subplot grid.")
929+
print(grid_str)
930+
Figure.print_grid = print_grid
931+
922932
return Figure
923933

924934
Figure = get_patched_figure_class(Figure)

0 commit comments

Comments
 (0)