Skip to content

Commit 68aee36

Browse files
committed
update make_subplot docstring
1 parent cebfae2 commit 68aee36

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

plotly/tools.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -500,43 +500,44 @@ def make_subplots(rows=1, cols=1,
500500
501501
Example 1:
502502
# stack two subplots vertically
503-
fig = tools.make_subplots(rows=2, print_grid=True)
503+
fig = tools.make_subplots(rows=2)
504504
505-
This is the format of your plot grid!
505+
This is the format of your plot grid:
506506
[ (1,1) x1,y1 ]
507507
[ (2,1) x2,y2 ]
508508
509-
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x1', yaxis='y1')]
509+
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2])]
510510
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
511511
512512
Example 2:
513513
# subplots with shared x axes
514-
fig = tools.make_subplots(rows=2, shared_xaxes=True, print_grid=True)
514+
fig = tools.make_subplots(rows=2, shared_xaxes=True)
515+
516+
This is the format of your plot grid:
517+
[ (1,1) x1,y1 ]
518+
[ (2,1) x1,y2 ]
515519
516-
TODO What's the default behavior here??
517520
518-
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], yaxis='y1')]
521+
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2])]
519522
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], yaxis='y2')]
520523
521524
Example 3:
522525
# irregular subplot layout (more examples below under 'specs')
523526
fig = tools.make_subplots(rows=2, cols=2,
524527
specs=[[{}, {}],
525-
[{'colspan': 2}, None]],
526-
print_grid=True)
528+
[{'colspan': 2}, None]])
527529
528530
This is the format of your plot grid!
529531
[ (1,1) x1,y1 ] [ (1,2) x2,y2 ]
530532
[ (2,1) x3,y3 - ]
531533
532-
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x1', yaxis='y1')]
534+
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2])]
533535
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
534536
fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x3', yaxis='y3')]
535537
536538
Example 4:
537539
# insets
538-
fig = tools.make_subplots(insets=[{'cell': (1,1), 'l': 0.7, 'b': 0.3}],
539-
print_grid=True)
540+
fig = tools.make_subplots(insets=[{'cell': (1,1), 'l': 0.7, 'b': 0.3}])
540541
541542
This is the format of your plot grid!
542543
[ (1,1) x1,y1 ]

0 commit comments

Comments
 (0)