@@ -391,13 +391,13 @@ def get_subplots(rows=1, columns=1, print_grid=False, **kwargs):
391
391
392
392
Example 1:
393
393
# stack two subplots vertically
394
- >>> fig = tools.get_subplots(rows=2)
395
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x1', yaxis='y1')]
396
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
394
+ fig = tools.get_subplots(rows=2)
395
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x1', yaxis='y1')]
396
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
397
397
398
398
Example 2:
399
399
# print out string showing the subplot grid you've put in the layout
400
- >>> fig = tools.get_subplots(rows=3, columns=2, print_grid=True)
400
+ fig = tools.get_subplots(rows=3, columns=2, print_grid=True)
401
401
402
402
Keywords arguments with constant defaults:
403
403
@@ -500,49 +500,52 @@ def make_subplots(rows=1, cols=1,
500
500
501
501
Example 1:
502
502
# stack two subplots vertically
503
- >>> fig = tools.make_subplots(rows=2, print_grid=True)
503
+ fig = tools.make_subplots(rows=2, print_grid=True)
504
+
504
505
This is the format of your plot grid!
505
506
[ (1,1) x1,y1 ]
506
507
[ (2,1) x2,y2 ]
507
508
508
- >>> 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], xaxis='x2', yaxis='y2')]
509
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x1', yaxis='y1')]
510
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
510
511
511
512
Example 2:
512
513
# subplots with shared x axes
513
- >>> fig = tools.make_subplots(rows=2, shared_xaxes=True, print_grid=True)
514
+ fig = tools.make_subplots(rows=2, shared_xaxes=True, print_grid=True)
514
515
515
516
TODO What's the default behavior here??
516
517
517
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], yaxis='y1')]
518
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], yaxis='y2')]
518
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], yaxis='y1')]
519
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], yaxis='y2')]
519
520
520
521
Example 3:
521
522
# irregular subplot layout (more examples below under 'specs')
522
- >>> fig = tools.make_subplots(rows=2, cols=2,
523
- specs=[[{}, {}],
524
- [{'colspan': 2}, None]],
525
- print_grid=True)
523
+ fig = tools.make_subplots(rows=2, cols=2,
524
+ specs=[[{}, {}],
525
+ [{'colspan': 2}, None]],
526
+ print_grid=True)
527
+
526
528
This is the format of your plot grid!
527
529
[ (1,1) x1,y1 ] [ (1,2) x2,y2 ]
528
530
[ (2,1) x3,y3 - ]
529
531
530
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x1', yaxis='y1')]
531
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
532
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x3', yaxis='y3')]
532
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x1', yaxis='y1')]
533
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
534
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x3', yaxis='y3')]
533
535
534
536
Example 4:
535
537
# insets
536
- >>> fig = tools.make_subplots(insets=[{'cell': (1,1), 'l': 0.7, 'b': 0.3}],
537
- print_grid=True)
538
+ fig = tools.make_subplots(insets=[{'cell': (1,1), 'l': 0.7, 'b': 0.3}],
539
+ print_grid=True)
540
+
538
541
This is the format of your plot grid!
539
542
[ (1,1) x1,y1 ]
540
543
541
544
With insets:
542
545
[ x2,y2 ] over [ (1,1) x1,y1 ]
543
546
544
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2])]
545
- >>> fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
547
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2])]
548
+ fig['data'] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2')]
546
549
547
550
Keywords arguments with constant defaults:
548
551
0 commit comments