-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathfigure_api.html
More file actions
10416 lines (10023 loc) · 925 KB
/
figure_api.html
File metadata and controls
10416 lines (10023 loc) · 925 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>matplotlib.figure — Matplotlib 3.4.2 documentation</title>
<link rel="stylesheet" href="../_static/mpl.css?v3.4.2-2-gf801f04d09-dirty" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
<link rel="stylesheet" type="text/css" href="../_static/plot_directive.css" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../_static/gallery.css" />
<link rel="stylesheet" type="text/css" href="../_static/gallery-binder.css" />
<link rel="stylesheet" type="text/css" href="../_static/gallery-dataframe.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/clipboard.min.js"></script>
<script src="../_static/copybutton.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Matplotlib 3.4.2 documentation"
href="../_static/opensearch.xml"/>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="matplotlib.font_manager" href="font_manager_api.html" />
<link rel="prev" title="matplotlib.dviread" href="dviread.html" />
<link rel="top" title="Matplotlib 3.4.2 documentation" href="#" />
<link rel="canonical" href="https://matplotlib.org/stable/api/figure_api.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
<script data-domain="matplotlib.org" defer="defer" src="https://views.scientific-python.org/js/script.js"></script>
</head><body>
<div id="unreleased-message"> You are reading an old version of the documentation (v3.4.2). For the latest version see <a href="https://matplotlib.org/stable/api/figure_api.html">https://matplotlib.org/stable/api/figure_api.html</a></div>
<!--
<div id="annc-banner">
</div>
-->
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px; position: relative;">
<a href="../index.html">
<div style="float: left; position: absolute; width: 496px; bottom: 0; padding-bottom: 24px"><span style="float: right; color: #789; background: white">Version 3.4.2</span></div>
<img src="../_static/logo2_compressed.svg" height="125px" border="0" alt="matplotlib"/></a>
<!-- The "Fork me on github" ribbon -->
<div id="forkongithub"><a href="https://github.com/matplotlib/matplotlib">Fork me on GitHub</a></div>
</div>
<nav class="main-nav">
<ul>
<li><a href="../users/installing.html">Installation</a></li>
<li><a href="../contents.html">Documentation</a></li>
<li><a href="../gallery/index.html">Examples</a></li>
<li><a href="../tutorials/index.html">Tutorials</a></li>
<li><a href="../devel/index.html">Contributing</a></li>
<li class="nav-right">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" placeholder="Search"/>
</form>
</li>
</ul>
</nav>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="font_manager_api.html" title="matplotlib.font_manager"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="dviread.html" title="matplotlib.dviread"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">home</a>| </li>
<li><a href="../contents.html">contents</a> »</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">API Overview</a> »</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">matplotlib.figure</span></code></a></li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div id="sidebar-pagesource" role="note" aria-label="source link"
style="margin-top: 1.5em; padding-top: 0.1em; border-top: 1px solid #86989b">
<a href="../_sources/api/figure_api.rst.txt"
style="color: #c0c0c0" rel="nofollow">Show Page Source</a>
</div>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-matplotlib.figure">
<span id="matplotlib-figure"></span><h1><code class="docutils literal notranslate"><span class="pre">matplotlib.figure</span></code><a class="headerlink" href="#module-matplotlib.figure" title="Permalink to this headline">¶</a></h1>
<p><a class="reference internal" href="#module-matplotlib.figure" title="matplotlib.figure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.figure</span></code></a> implements the following classes:</p>
<dl class="docutils">
<dt><a class="reference internal" href="#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure</span></code></a></dt><dd>Top level <a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Artist</span></code></a>, which holds all plot elements.
Many methods are implemented in <a class="reference internal" href="#matplotlib.figure.FigureBase" title="matplotlib.figure.FigureBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureBase</span></code></a>.</dd>
<dt><a class="reference internal" href="#matplotlib.figure.SubFigure" title="matplotlib.figure.SubFigure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubFigure</span></code></a></dt><dd>A logical figure inside a figure, usually added to a figure (or parent
<a class="reference internal" href="#matplotlib.figure.SubFigure" title="matplotlib.figure.SubFigure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubFigure</span></code></a>) with <a class="reference internal" href="#matplotlib.figure.Figure.add_subfigure" title="matplotlib.figure.Figure.add_subfigure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.add_subfigure</span></code></a> or <a class="reference internal" href="#matplotlib.figure.Figure.subfigures" title="matplotlib.figure.Figure.subfigures"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.subfigures</span></code></a> methods
(provisional API v3.4).</dd>
<dt><a class="reference internal" href="#matplotlib.figure.SubplotParams" title="matplotlib.figure.SubplotParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotParams</span></code></a></dt><dd>Control the default spacing between subplots.</dd>
</dl>
<dl class="py class">
<dt id="matplotlib.figure.Figure">
<em class="property">class </em><code class="descclassname">matplotlib.figure.</code><code class="descname">Figure</code><span class="sig-paren">(</span><em><span class="n">figsize</span><span class="o">=</span><span class="default_value">None</span></em>, <em><span class="n">dpi</span><span class="o">=</span><span class="default_value">None</span></em>, <em><span class="n">facecolor</span><span class="o">=</span><span class="default_value">None</span></em>, <em><span class="n">edgecolor</span><span class="o">=</span><span class="default_value">None</span></em>, <em><span class="n">linewidth</span><span class="o">=</span><span class="default_value">0.0</span></em>, <em><span class="n">frameon</span><span class="o">=</span><span class="default_value">None</span></em>, <em><span class="n">subplotpars</span><span class="o">=</span><span class="default_value">None</span></em>, <em><span class="n">tight_layout</span><span class="o">=</span><span class="default_value">None</span></em>, <em><span class="n">constrained_layout</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/matplotlib/figure.html#Figure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#matplotlib.figure.Figure" title="Permalink to this definition">¶</a></dt>
<dd><p>The top level container for all the plot elements.</p>
<p>The Figure instance supports callbacks through a <em>callbacks</em> attribute
which is a <a class="reference internal" href="cbook_api.html#matplotlib.cbook.CallbackRegistry" title="matplotlib.cbook.CallbackRegistry"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CallbackRegistry</span></code></a> instance. The events you can connect to
are 'dpi_changed', and the callback will be called with <code class="docutils literal notranslate"><span class="pre">func(fig)</span></code> where
fig is the <a class="reference internal" href="#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure</span></code></a> instance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Attributes:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>patch</strong></dt><dd><p>The <a class="reference internal" href="_as_gen/matplotlib.patches.Rectangle.html#matplotlib.patches.Rectangle" title="matplotlib.patches.Rectangle"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Rectangle</span></code></a> instance representing the figure background patch.</p>
</dd>
<dt><strong>suppressComposite</strong></dt><dd><p>For multiple figure images, the figure will make composite images
depending on the renderer option_image_nocomposite function. If
<em>suppressComposite</em> is a boolean, this will override the renderer.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>figsize</strong><span class="classifier">2-tuple of floats, default: <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.figsize#a-sample-matplotlibrc-file"><span class="pre">rcParams["figure.figsize"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">[6.4,</span> <span class="pre">4.8]</span></code>)</span></dt><dd><p>Figure dimension <code class="docutils literal notranslate"><span class="pre">(width,</span> <span class="pre">height)</span></code> in inches.</p>
</dd>
<dt><strong>dpi</strong><span class="classifier">float, default: <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.dpi#a-sample-matplotlibrc-file"><span class="pre">rcParams["figure.dpi"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">100.0</span></code>)</span></dt><dd><p>Dots per inch.</p>
</dd>
<dt><strong>facecolor</strong><span class="classifier">default: <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.facecolor#a-sample-matplotlibrc-file"><span class="pre">rcParams["figure.facecolor"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">'white'</span></code>)</span></dt><dd><p>The figure patch facecolor.</p>
</dd>
<dt><strong>edgecolor</strong><span class="classifier">default: <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.edgecolor#a-sample-matplotlibrc-file"><span class="pre">rcParams["figure.edgecolor"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">'white'</span></code>)</span></dt><dd><p>The figure patch edge color.</p>
</dd>
<dt><strong>linewidth</strong><span class="classifier">float</span></dt><dd><p>The linewidth of the frame (i.e. the edge linewidth of the figure
patch).</p>
</dd>
<dt><strong>frameon</strong><span class="classifier">bool, default: <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.frameon#a-sample-matplotlibrc-file"><span class="pre">rcParams["figure.frameon"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">True</span></code>)</span></dt><dd><p>If <code class="docutils literal notranslate"><span class="pre">False</span></code>, suppress drawing the figure background patch.</p>
</dd>
<dt><strong>subplotpars</strong><span class="classifier"><a class="reference internal" href="#matplotlib.figure.SubplotParams" title="matplotlib.figure.SubplotParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotParams</span></code></a></span></dt><dd><p>Subplot parameters. If not given, the default subplot
parameters <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.subplot.*#a-sample-matplotlibrc-file"><span class="pre">rcParams["figure.subplot.*"]</span></a></code> are used.</p>
</dd>
<dt><strong>tight_layout</strong><span class="classifier">bool or dict, default: <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.autolayout#a-sample-matplotlibrc-file"><span class="pre">rcParams["figure.autolayout"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">False</span></code>)</span></dt><dd><p>If <code class="docutils literal notranslate"><span class="pre">False</span></code> use <em>subplotpars</em>. If <code class="docutils literal notranslate"><span class="pre">True</span></code> adjust subplot
parameters using <a class="reference internal" href="#matplotlib.figure.Figure.tight_layout" title="matplotlib.figure.Figure.tight_layout"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tight_layout</span></code></a> with default padding.
When providing a dict containing the keys <code class="docutils literal notranslate"><span class="pre">pad</span></code>, <code class="docutils literal notranslate"><span class="pre">w_pad</span></code>,
<code class="docutils literal notranslate"><span class="pre">h_pad</span></code>, and <code class="docutils literal notranslate"><span class="pre">rect</span></code>, the default <a class="reference internal" href="#matplotlib.figure.Figure.tight_layout" title="matplotlib.figure.Figure.tight_layout"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tight_layout</span></code></a> paddings
will be overridden.</p>
</dd>
<dt><strong>constrained_layout</strong><span class="classifier">bool, default: <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.constrained_layout.use#a-sample-matplotlibrc-file"><span class="pre">rcParams["figure.constrained_layout.use"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">False</span></code>)</span></dt><dd><p>If <code class="docutils literal notranslate"><span class="pre">True</span></code> use constrained layout to adjust positioning of plot
elements. Like <code class="docutils literal notranslate"><span class="pre">tight_layout</span></code>, but designed to be more
flexible. See
<a class="reference internal" href="../tutorials/intermediate/constrainedlayout_guide.html"><span class="doc">Constrained Layout Guide</span></a>
for examples. (Note: does not work with <a class="reference internal" href="#matplotlib.figure.Figure.add_subplot" title="matplotlib.figure.Figure.add_subplot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_subplot</span></code></a> or
<a class="reference internal" href="_as_gen/matplotlib.pyplot.subplot2grid.html#matplotlib.pyplot.subplot2grid" title="matplotlib.pyplot.subplot2grid"><code class="xref py py-obj docutils literal notranslate"><span class="pre">subplot2grid</span></code></a>.)</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<dl class="py method">
<dt id="matplotlib.figure.Figure.add_artist">
<code class="descname">add_artist</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">artist</span></em>, <em><span class="n">clip</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.add_artist" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an <a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Artist</span></code></a> to the figure.</p>
<p>Usually artists are added to Axes objects using <a class="reference internal" href="_as_gen/matplotlib.axes.Axes.add_artist.html#matplotlib.axes.Axes.add_artist" title="matplotlib.axes.Axes.add_artist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes.add_artist</span></code></a>;
this method can be used in the rare cases where one needs to add
artists directly to the figure instead.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>artist</strong><span class="classifier"><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Artist</span></code></a></span></dt><dd><p>The artist to add to the figure. If the added artist has no
transform previously set, its transform will be set to
<code class="docutils literal notranslate"><span class="pre">figure.transSubfigure</span></code>.</p>
</dd>
<dt><strong>clip</strong><span class="classifier">bool, default: False</span></dt><dd><p>Whether the added artist should be clipped by the figure patch.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Artist</span></code></a></dt><dd><p>The added artist.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.add_axes">
<code class="descname">add_axes</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="o">*</span><span class="n">args</span></em>, <em><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.add_axes" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an Axes to the figure.</p>
<p>Call signatures:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">add_axes</span><span class="p">(</span><span class="n">rect</span><span class="p">,</span> <span class="n">projection</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">polar</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">add_axes</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>rect</strong><span class="classifier">sequence of float</span></dt><dd><p>The dimensions [left, bottom, width, height] of the new Axes. All
quantities are in fractions of figure width and height.</p>
</dd>
<dt><strong>projection</strong><span class="classifier">{None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional</span></dt><dd><p>The projection type of the <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>. <em>str</em> is the name of
a custom projection, see <a class="reference internal" href="projections_api.html#module-matplotlib.projections" title="matplotlib.projections"><code class="xref py py-obj docutils literal notranslate"><span class="pre">projections</span></code></a>. The default
None results in a 'rectilinear' projection.</p>
</dd>
<dt><strong>polar</strong><span class="classifier">bool, default: False</span></dt><dd><p>If True, equivalent to projection='polar'.</p>
</dd>
<dt><strong>axes_class</strong><span class="classifier">subclass type of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>, optional</span></dt><dd><p>The <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">axes.Axes</span></code></a> subclass that is instantiated. This parameter
is incompatible with <em>projection</em> and <em>polar</em>. See
<a class="reference internal" href="../tutorials/toolkits/axisartist.html#axisartist-users-guide-index"><span class="std std-ref">axisartist</span></a> for examples.</p>
</dd>
<dt><strong>sharex, sharey</strong><span class="classifier"><a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>, optional</span></dt><dd><p>Share the x or y <a class="reference internal" href="axis_api.html#module-matplotlib.axis" title="matplotlib.axis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">axis</span></code></a> with sharex and/or sharey.
The axis will have the same limits, ticks, and scale as the axis
of the shared axes.</p>
</dd>
<dt><strong>label</strong><span class="classifier">str</span></dt><dd><p>A label for the returned Axes.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
<dt><a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>, or a subclass of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a></dt><dd><p>The returned axes class depends on the projection used. It is
<a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a> if rectilinear projection is used and
<a class="reference internal" href="projections_api.html#matplotlib.projections.polar.PolarAxes" title="matplotlib.projections.polar.PolarAxes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">projections.polar.PolarAxes</span></code></a> if polar projection is used.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Other Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>**kwargs</strong></dt><dd><p>This method also takes the keyword arguments for
the returned Axes class. The keyword arguments for the
rectilinear Axes class <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a> can be found in
the following table but there might also be other keyword
arguments if another projection is used, see the actual Axes
class.</p>
<table border="1" class="property-table docutils align-default">
<colgroup>
<col width="43%" />
<col width="57%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_adjustable.html#matplotlib.axes.Axes.set_adjustable" title="matplotlib.axes.Axes.set_adjustable"><code class="xref py py-meth docutils literal notranslate"><span class="pre">adjustable</span></code></a></td>
<td>{'box', 'datalim'}</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_agg_filter.html#matplotlib.artist.Artist.set_agg_filter" title="matplotlib.artist.Artist.set_agg_filter"><code class="xref py py-meth docutils literal notranslate"><span class="pre">agg_filter</span></code></a></td>
<td>a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_alpha.html#matplotlib.artist.Artist.set_alpha" title="matplotlib.artist.Artist.set_alpha"><code class="xref py py-meth docutils literal notranslate"><span class="pre">alpha</span></code></a></td>
<td>scalar or None</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_anchor.html#matplotlib.axes.Axes.set_anchor" title="matplotlib.axes.Axes.set_anchor"><code class="xref py py-meth docutils literal notranslate"><span class="pre">anchor</span></code></a></td>
<td>2-tuple of floats or {'C', 'SW', 'S', 'SE', ...}</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_animated.html#matplotlib.artist.Artist.set_animated" title="matplotlib.artist.Artist.set_animated"><code class="xref py py-meth docutils literal notranslate"><span class="pre">animated</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_aspect.html#matplotlib.axes.Axes.set_aspect" title="matplotlib.axes.Axes.set_aspect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">aspect</span></code></a></td>
<td>{'auto', 'equal'} or float</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_autoscale_on.html#matplotlib.axes.Axes.set_autoscale_on" title="matplotlib.axes.Axes.set_autoscale_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">autoscale_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_autoscalex_on.html#matplotlib.axes.Axes.set_autoscalex_on" title="matplotlib.axes.Axes.set_autoscalex_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">autoscalex_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_autoscaley_on.html#matplotlib.axes.Axes.set_autoscaley_on" title="matplotlib.axes.Axes.set_autoscaley_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">autoscaley_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_axes_locator.html#matplotlib.axes.Axes.set_axes_locator" title="matplotlib.axes.Axes.set_axes_locator"><code class="xref py py-meth docutils literal notranslate"><span class="pre">axes_locator</span></code></a></td>
<td>Callable[[Axes, Renderer], Bbox]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_axisbelow.html#matplotlib.axes.Axes.set_axisbelow" title="matplotlib.axes.Axes.set_axisbelow"><code class="xref py py-meth docutils literal notranslate"><span class="pre">axisbelow</span></code></a></td>
<td>bool or 'line'</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_box_aspect.html#matplotlib.axes.Axes.set_box_aspect" title="matplotlib.axes.Axes.set_box_aspect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">box_aspect</span></code></a></td>
<td>float or None</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_clip_box.html#matplotlib.artist.Artist.set_clip_box" title="matplotlib.artist.Artist.set_clip_box"><code class="xref py py-meth docutils literal notranslate"><span class="pre">clip_box</span></code></a></td>
<td><a class="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Bbox</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_clip_on.html#matplotlib.artist.Artist.set_clip_on" title="matplotlib.artist.Artist.set_clip_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">clip_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_clip_path.html#matplotlib.artist.Artist.set_clip_path" title="matplotlib.artist.Artist.set_clip_path"><code class="xref py py-meth docutils literal notranslate"><span class="pre">clip_path</span></code></a></td>
<td>Patch or (Path, Transform) or None</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_contains.html#matplotlib.artist.Artist.set_contains" title="matplotlib.artist.Artist.set_contains"><code class="xref py py-meth docutils literal notranslate"><span class="pre">contains</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_facecolor.html#matplotlib.axes.Axes.set_facecolor" title="matplotlib.axes.Axes.set_facecolor"><code class="xref py py-meth docutils literal notranslate"><span class="pre">facecolor</span></code></a> or fc</td>
<td>color</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_figure.html#matplotlib.artist.Artist.set_figure" title="matplotlib.artist.Artist.set_figure"><code class="xref py py-meth docutils literal notranslate"><span class="pre">figure</span></code></a></td>
<td><a class="reference internal" href="#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure</span></code></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_frame_on.html#matplotlib.axes.Axes.set_frame_on" title="matplotlib.axes.Axes.set_frame_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">frame_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_gid.html#matplotlib.artist.Artist.set_gid" title="matplotlib.artist.Artist.set_gid"><code class="xref py py-meth docutils literal notranslate"><span class="pre">gid</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_in_layout.html#matplotlib.artist.Artist.set_in_layout" title="matplotlib.artist.Artist.set_in_layout"><code class="xref py py-meth docutils literal notranslate"><span class="pre">in_layout</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_label.html#matplotlib.artist.Artist.set_label" title="matplotlib.artist.Artist.set_label"><code class="xref py py-meth docutils literal notranslate"><span class="pre">label</span></code></a></td>
<td>object</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_navigate.html#matplotlib.axes.Axes.set_navigate" title="matplotlib.axes.Axes.set_navigate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">navigate</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_navigate_mode.html#matplotlib.axes.Axes.set_navigate_mode" title="matplotlib.axes.Axes.set_navigate_mode"><code class="xref py py-meth docutils literal notranslate"><span class="pre">navigate_mode</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_path_effects.html#matplotlib.artist.Artist.set_path_effects" title="matplotlib.artist.Artist.set_path_effects"><code class="xref py py-meth docutils literal notranslate"><span class="pre">path_effects</span></code></a></td>
<td><a class="reference internal" href="patheffects_api.html#matplotlib.patheffects.AbstractPathEffect" title="matplotlib.patheffects.AbstractPathEffect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AbstractPathEffect</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_picker.html#matplotlib.artist.Artist.set_picker" title="matplotlib.artist.Artist.set_picker"><code class="xref py py-meth docutils literal notranslate"><span class="pre">picker</span></code></a></td>
<td>None or bool or float or callable</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_position.html#matplotlib.axes.Axes.set_position" title="matplotlib.axes.Axes.set_position"><code class="xref py py-meth docutils literal notranslate"><span class="pre">position</span></code></a></td>
<td>[left, bottom, width, height] or <a class="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Bbox</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_prop_cycle.html#matplotlib.axes.Axes.set_prop_cycle" title="matplotlib.axes.Axes.set_prop_cycle"><code class="xref py py-meth docutils literal notranslate"><span class="pre">prop_cycle</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_rasterization_zorder.html#matplotlib.axes.Axes.set_rasterization_zorder" title="matplotlib.axes.Axes.set_rasterization_zorder"><code class="xref py py-meth docutils literal notranslate"><span class="pre">rasterization_zorder</span></code></a></td>
<td>float or None</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_rasterized.html#matplotlib.artist.Artist.set_rasterized" title="matplotlib.artist.Artist.set_rasterized"><code class="xref py py-meth docutils literal notranslate"><span class="pre">rasterized</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_sketch_params.html#matplotlib.artist.Artist.set_sketch_params" title="matplotlib.artist.Artist.set_sketch_params"><code class="xref py py-meth docutils literal notranslate"><span class="pre">sketch_params</span></code></a></td>
<td>(scale: float, length: float, randomness: float)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_snap.html#matplotlib.artist.Artist.set_snap" title="matplotlib.artist.Artist.set_snap"><code class="xref py py-meth docutils literal notranslate"><span class="pre">snap</span></code></a></td>
<td>bool or None</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_title.html#matplotlib.axes.Axes.set_title" title="matplotlib.axes.Axes.set_title"><code class="xref py py-meth docutils literal notranslate"><span class="pre">title</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_transform.html#matplotlib.artist.Artist.set_transform" title="matplotlib.artist.Artist.set_transform"><code class="xref py py-meth docutils literal notranslate"><span class="pre">transform</span></code></a></td>
<td><a class="reference internal" href="transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Transform</span></code></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_url.html#matplotlib.artist.Artist.set_url" title="matplotlib.artist.Artist.set_url"><code class="xref py py-meth docutils literal notranslate"><span class="pre">url</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_visible.html#matplotlib.artist.Artist.set_visible" title="matplotlib.artist.Artist.set_visible"><code class="xref py py-meth docutils literal notranslate"><span class="pre">visible</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xbound.html#matplotlib.axes.Axes.set_xbound" title="matplotlib.axes.Axes.set_xbound"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xbound</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xlabel.html#matplotlib.axes.Axes.set_xlabel" title="matplotlib.axes.Axes.set_xlabel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xlabel</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xlim.html#matplotlib.axes.Axes.set_xlim" title="matplotlib.axes.Axes.set_xlim"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xlim</span></code></a></td>
<td>(bottom: float, top: float)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xmargin.html#matplotlib.axes.Axes.set_xmargin" title="matplotlib.axes.Axes.set_xmargin"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xmargin</span></code></a></td>
<td>float greater than -0.5</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xscale.html#matplotlib.axes.Axes.set_xscale" title="matplotlib.axes.Axes.set_xscale"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xscale</span></code></a></td>
<td>{"linear", "log", "symlog", "logit", ...} or <a class="reference internal" href="scale_api.html#matplotlib.scale.ScaleBase" title="matplotlib.scale.ScaleBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ScaleBase</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xticklabels.html#matplotlib.axes.Axes.set_xticklabels" title="matplotlib.axes.Axes.set_xticklabels"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xticklabels</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xticks.html#matplotlib.axes.Axes.set_xticks" title="matplotlib.axes.Axes.set_xticks"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xticks</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_ybound.html#matplotlib.axes.Axes.set_ybound" title="matplotlib.axes.Axes.set_ybound"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ybound</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_ylabel.html#matplotlib.axes.Axes.set_ylabel" title="matplotlib.axes.Axes.set_ylabel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ylabel</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_ylim.html#matplotlib.axes.Axes.set_ylim" title="matplotlib.axes.Axes.set_ylim"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ylim</span></code></a></td>
<td>(bottom: float, top: float)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_ymargin.html#matplotlib.axes.Axes.set_ymargin" title="matplotlib.axes.Axes.set_ymargin"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ymargin</span></code></a></td>
<td>float greater than -0.5</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_yscale.html#matplotlib.axes.Axes.set_yscale" title="matplotlib.axes.Axes.set_yscale"><code class="xref py py-meth docutils literal notranslate"><span class="pre">yscale</span></code></a></td>
<td>{"linear", "log", "symlog", "logit", ...} or <a class="reference internal" href="scale_api.html#matplotlib.scale.ScaleBase" title="matplotlib.scale.ScaleBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ScaleBase</span></code></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_yticklabels.html#matplotlib.axes.Axes.set_yticklabels" title="matplotlib.axes.Axes.set_yticklabels"><code class="xref py py-meth docutils literal notranslate"><span class="pre">yticklabels</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_yticks.html#matplotlib.axes.Axes.set_yticks" title="matplotlib.axes.Axes.set_yticks"><code class="xref py py-meth docutils literal notranslate"><span class="pre">yticks</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_zorder.html#matplotlib.artist.Artist.set_zorder" title="matplotlib.artist.Artist.set_zorder"><code class="xref py py-meth docutils literal notranslate"><span class="pre">zorder</span></code></a></td>
<td>float</td>
</tr>
</tbody>
</table>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#matplotlib.figure.Figure.add_subplot" title="matplotlib.figure.Figure.add_subplot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.add_subplot</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="_as_gen/matplotlib.pyplot.subplot.html#matplotlib.pyplot.subplot" title="matplotlib.pyplot.subplot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.subplot</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="_as_gen/matplotlib.pyplot.axes.html#matplotlib.pyplot.axes" title="matplotlib.pyplot.axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.axes</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="#matplotlib.figure.Figure.subplots" title="matplotlib.figure.Figure.subplots"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.subplots</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="_as_gen/matplotlib.pyplot.subplots.html#matplotlib.pyplot.subplots" title="matplotlib.pyplot.subplots"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.subplots</span></code></a></dt><dd></dd>
</dl>
</div>
<p class="rubric">Notes</p>
<p>In rare circumstances, <a class="reference internal" href="#matplotlib.figure.Figure.add_axes" title="matplotlib.figure.Figure.add_axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_axes</span></code></a> may be called with a single
argument, an Axes instance already created in the present figure but
not in the figure's list of Axes.</p>
<p class="rubric">Examples</p>
<p>Some simple examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rect</span> <span class="o">=</span> <span class="n">l</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">w</span><span class="p">,</span> <span class="n">h</span>
<span class="n">fig</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">()</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_axes</span><span class="p">(</span><span class="n">rect</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_axes</span><span class="p">(</span><span class="n">rect</span><span class="p">,</span> <span class="n">frameon</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">facecolor</span><span class="o">=</span><span class="s1">'g'</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_axes</span><span class="p">(</span><span class="n">rect</span><span class="p">,</span> <span class="n">polar</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">ax</span> <span class="o">=</span> <span class="n">fig</span><span class="o">.</span><span class="n">add_axes</span><span class="p">(</span><span class="n">rect</span><span class="p">,</span> <span class="n">projection</span><span class="o">=</span><span class="s1">'polar'</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">delaxes</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_axes</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.add_axobserver">
<code class="descname">add_axobserver</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">func</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/matplotlib/figure.html#Figure.add_axobserver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#matplotlib.figure.Figure.add_axobserver" title="Permalink to this definition">¶</a></dt>
<dd><p>Whenever the Axes state change, <code class="docutils literal notranslate"><span class="pre">func(self)</span></code> will be called.</p>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.add_callback">
<code class="descname">add_callback</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">func</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.add_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callback function that will be called whenever one of the
<a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Artist</span></code></a>'s properties changes.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>func</strong><span class="classifier">callable</span></dt><dd><p>The callback function. It must have the signature:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">func</span><span class="p">(</span><span class="n">artist</span><span class="p">:</span> <span class="n">Artist</span><span class="p">)</span> <span class="o">-></span> <span class="n">Any</span>
</pre></div>
</div>
<p>where <em>artist</em> is the calling <a class="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Artist</span></code></a>. Return values may exist
but are ignored.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt>int</dt><dd><p>The observer id associated with the callback. This id can be
used for removing the callback with <a class="reference internal" href="#matplotlib.figure.Figure.remove_callback" title="matplotlib.figure.Figure.remove_callback"><code class="xref py py-obj docutils literal notranslate"><span class="pre">remove_callback</span></code></a> later.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#matplotlib.figure.Figure.remove_callback" title="matplotlib.figure.Figure.remove_callback"><code class="xref py py-obj docutils literal notranslate"><span class="pre">remove_callback</span></code></a></dt><dd></dd>
</dl>
</div>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.add_gridspec">
<code class="descname">add_gridspec</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">nrows</span><span class="o">=</span><span class="default_value">1</span></em>, <em><span class="n">ncols</span><span class="o">=</span><span class="default_value">1</span></em>, <em><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.add_gridspec" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <a class="reference internal" href="_as_gen/matplotlib.gridspec.GridSpec.html#matplotlib.gridspec.GridSpec" title="matplotlib.gridspec.GridSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GridSpec</span></code></a> that has this figure as a parent. This allows
complex layout of Axes in the figure.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>nrows</strong><span class="classifier">int, default: 1</span></dt><dd><p>Number of rows in grid.</p>
</dd>
<dt><strong>ncols</strong><span class="classifier">int, default: 1</span></dt><dd><p>Number or columns in grid.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
<dt><a class="reference internal" href="_as_gen/matplotlib.gridspec.GridSpec.html#matplotlib.gridspec.GridSpec" title="matplotlib.gridspec.GridSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GridSpec</span></code></a></dt><dd></dd>
</dl>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Other Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>**kwargs</strong></dt><dd><p>Keyword arguments are passed to <a class="reference internal" href="_as_gen/matplotlib.gridspec.GridSpec.html#matplotlib.gridspec.GridSpec" title="matplotlib.gridspec.GridSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GridSpec</span></code></a>.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="_as_gen/matplotlib.pyplot.subplots.html#matplotlib.pyplot.subplots" title="matplotlib.pyplot.subplots"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.pyplot.subplots</span></code></a></dt><dd></dd>
</dl>
</div>
<p class="rubric">Examples</p>
<p>Adding a subplot that spans two rows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fig</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">()</span>
<span class="n">gs</span> <span class="o">=</span> <span class="n">fig</span><span class="o">.</span><span class="n">add_gridspec</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="n">ax1</span> <span class="o">=</span> <span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="n">gs</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">])</span>
<span class="n">ax2</span> <span class="o">=</span> <span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="n">gs</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">])</span>
<span class="c1"># spans two rows:</span>
<span class="n">ax3</span> <span class="o">=</span> <span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="n">gs</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">])</span>
</pre></div>
</div>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.add_subfigure">
<code class="descname">add_subfigure</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">subplotspec</span></em>, <em><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.add_subfigure" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a <a class="reference internal" href="#matplotlib.figure.SubFigure" title="matplotlib.figure.SubFigure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubFigure</span></code></a> to the figure as part of a subplot
arrangement.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>subplotspec</strong><span class="classifier"><a class="reference internal" href="_as_gen/matplotlib.gridspec.SubplotSpec.html#matplotlib.gridspec.SubplotSpec" title="matplotlib.gridspec.SubplotSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gridspec.SubplotSpec</span></code></a></span></dt><dd><p>Defines the region in a parent gridspec where the subfigure will
be placed.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
<dt><a class="reference internal" href="#matplotlib.figure.SubFigure" title="matplotlib.figure.SubFigure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">figure.SubFigure</span></code></a></dt><dd></dd>
</dl>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Other Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>**kwargs</strong></dt><dd><p>Are passed to the <a class="reference internal" href="#matplotlib.figure.SubFigure" title="matplotlib.figure.SubFigure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubFigure</span></code></a> object.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#matplotlib.figure.Figure.subfigures" title="matplotlib.figure.Figure.subfigures"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.subfigures</span></code></a></dt><dd></dd>
</dl>
</div>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.add_subplot">
<code class="descname">add_subplot</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="o">*</span><span class="n">args</span></em>, <em><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.add_subplot" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a> to the figure as part of a subplot arrangement.</p>
<p>Call signatures:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">add_subplot</span><span class="p">(</span><span class="n">nrows</span><span class="p">,</span> <span class="n">ncols</span><span class="p">,</span> <span class="n">index</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">add_subplot</span><span class="p">(</span><span class="n">pos</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="n">add_subplot</span><span class="p">(</span><span class="n">ax</span><span class="p">)</span>
<span class="n">add_subplot</span><span class="p">()</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>*args</strong><span class="classifier">int, (int, int, <em>index</em>), or <a class="reference internal" href="_as_gen/matplotlib.gridspec.SubplotSpec.html#matplotlib.gridspec.SubplotSpec" title="matplotlib.gridspec.SubplotSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotSpec</span></code></a>, default: (1, 1, 1)</span></dt><dd><p>The position of the subplot described by one of</p>
<ul class="simple">
<li>Three integers (<em>nrows</em>, <em>ncols</em>, <em>index</em>). The subplot will
take the <em>index</em> position on a grid with <em>nrows</em> rows and
<em>ncols</em> columns. <em>index</em> starts at 1 in the upper left corner
and increases to the right. <em>index</em> can also be a two-tuple
specifying the (<em>first</em>, <em>last</em>) indices (1-based, and including
<em>last</em>) of the subplot, e.g., <code class="docutils literal notranslate"><span class="pre">fig.add_subplot(3,</span> <span class="pre">1,</span> <span class="pre">(1,</span> <span class="pre">2))</span></code>
makes a subplot that spans the upper 2/3 of the figure.</li>
<li>A 3-digit integer. The digits are interpreted as if given
separately as three single-digit integers, i.e.
<code class="docutils literal notranslate"><span class="pre">fig.add_subplot(235)</span></code> is the same as
<code class="docutils literal notranslate"><span class="pre">fig.add_subplot(2,</span> <span class="pre">3,</span> <span class="pre">5)</span></code>. Note that this can only be used
if there are no more than 9 subplots.</li>
<li>A <a class="reference internal" href="_as_gen/matplotlib.gridspec.SubplotSpec.html#matplotlib.gridspec.SubplotSpec" title="matplotlib.gridspec.SubplotSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotSpec</span></code></a>.</li>
</ul>
<p>In rare circumstances, <a class="reference internal" href="#matplotlib.figure.Figure.add_subplot" title="matplotlib.figure.Figure.add_subplot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_subplot</span></code></a> may be called with a single
argument, a subplot Axes instance already created in the
present figure but not in the figure's list of Axes.</p>
</dd>
<dt><strong>projection</strong><span class="classifier">{None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional</span></dt><dd><p>The projection type of the subplot (<a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>). <em>str</em> is the
name of a custom projection, see <a class="reference internal" href="projections_api.html#module-matplotlib.projections" title="matplotlib.projections"><code class="xref py py-obj docutils literal notranslate"><span class="pre">projections</span></code></a>. The
default None results in a 'rectilinear' projection.</p>
</dd>
<dt><strong>polar</strong><span class="classifier">bool, default: False</span></dt><dd><p>If True, equivalent to projection='polar'.</p>
</dd>
<dt><strong>axes_class</strong><span class="classifier">subclass type of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>, optional</span></dt><dd><p>The <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">axes.Axes</span></code></a> subclass that is instantiated. This parameter
is incompatible with <em>projection</em> and <em>polar</em>. See
<a class="reference internal" href="../tutorials/toolkits/axisartist.html#axisartist-users-guide-index"><span class="std std-ref">axisartist</span></a> for examples.</p>
</dd>
<dt><strong>sharex, sharey</strong><span class="classifier"><a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>, optional</span></dt><dd><p>Share the x or y <a class="reference internal" href="axis_api.html#module-matplotlib.axis" title="matplotlib.axis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">axis</span></code></a> with sharex and/or sharey.
The axis will have the same limits, ticks, and scale as the axis
of the shared axes.</p>
</dd>
<dt><strong>label</strong><span class="classifier">str</span></dt><dd><p>A label for the returned Axes.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first docutils">
<dt><a class="reference internal" href="_as_gen/matplotlib.axes.SubplotBase.html#matplotlib.axes.SubplotBase" title="matplotlib.axes.SubplotBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">axes.SubplotBase</span></code></a>, or another subclass of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a></dt><dd><p>The Axes of the subplot. The returned Axes base class depends on
the projection used. It is <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a> if rectilinear projection
is used and <a class="reference internal" href="projections_api.html#matplotlib.projections.polar.PolarAxes" title="matplotlib.projections.polar.PolarAxes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">projections.polar.PolarAxes</span></code></a> if polar projection
is used. The returned Axes is then a subplot subclass of the
base class.</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Other Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>**kwargs</strong></dt><dd><p>This method also takes the keyword arguments for the returned Axes
base class; except for the <em>figure</em> argument. The keyword arguments
for the rectilinear base class <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a> can be found in
the following table but there might also be other keyword
arguments if another projection is used.</p>
<table border="1" class="property-table docutils align-default">
<colgroup>
<col width="43%" />
<col width="57%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_adjustable.html#matplotlib.axes.Axes.set_adjustable" title="matplotlib.axes.Axes.set_adjustable"><code class="xref py py-meth docutils literal notranslate"><span class="pre">adjustable</span></code></a></td>
<td>{'box', 'datalim'}</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_agg_filter.html#matplotlib.artist.Artist.set_agg_filter" title="matplotlib.artist.Artist.set_agg_filter"><code class="xref py py-meth docutils literal notranslate"><span class="pre">agg_filter</span></code></a></td>
<td>a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_alpha.html#matplotlib.artist.Artist.set_alpha" title="matplotlib.artist.Artist.set_alpha"><code class="xref py py-meth docutils literal notranslate"><span class="pre">alpha</span></code></a></td>
<td>scalar or None</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_anchor.html#matplotlib.axes.Axes.set_anchor" title="matplotlib.axes.Axes.set_anchor"><code class="xref py py-meth docutils literal notranslate"><span class="pre">anchor</span></code></a></td>
<td>2-tuple of floats or {'C', 'SW', 'S', 'SE', ...}</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_animated.html#matplotlib.artist.Artist.set_animated" title="matplotlib.artist.Artist.set_animated"><code class="xref py py-meth docutils literal notranslate"><span class="pre">animated</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_aspect.html#matplotlib.axes.Axes.set_aspect" title="matplotlib.axes.Axes.set_aspect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">aspect</span></code></a></td>
<td>{'auto', 'equal'} or float</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_autoscale_on.html#matplotlib.axes.Axes.set_autoscale_on" title="matplotlib.axes.Axes.set_autoscale_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">autoscale_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_autoscalex_on.html#matplotlib.axes.Axes.set_autoscalex_on" title="matplotlib.axes.Axes.set_autoscalex_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">autoscalex_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_autoscaley_on.html#matplotlib.axes.Axes.set_autoscaley_on" title="matplotlib.axes.Axes.set_autoscaley_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">autoscaley_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_axes_locator.html#matplotlib.axes.Axes.set_axes_locator" title="matplotlib.axes.Axes.set_axes_locator"><code class="xref py py-meth docutils literal notranslate"><span class="pre">axes_locator</span></code></a></td>
<td>Callable[[Axes, Renderer], Bbox]</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_axisbelow.html#matplotlib.axes.Axes.set_axisbelow" title="matplotlib.axes.Axes.set_axisbelow"><code class="xref py py-meth docutils literal notranslate"><span class="pre">axisbelow</span></code></a></td>
<td>bool or 'line'</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_box_aspect.html#matplotlib.axes.Axes.set_box_aspect" title="matplotlib.axes.Axes.set_box_aspect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">box_aspect</span></code></a></td>
<td>float or None</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_clip_box.html#matplotlib.artist.Artist.set_clip_box" title="matplotlib.artist.Artist.set_clip_box"><code class="xref py py-meth docutils literal notranslate"><span class="pre">clip_box</span></code></a></td>
<td><a class="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Bbox</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_clip_on.html#matplotlib.artist.Artist.set_clip_on" title="matplotlib.artist.Artist.set_clip_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">clip_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_clip_path.html#matplotlib.artist.Artist.set_clip_path" title="matplotlib.artist.Artist.set_clip_path"><code class="xref py py-meth docutils literal notranslate"><span class="pre">clip_path</span></code></a></td>
<td>Patch or (Path, Transform) or None</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_contains.html#matplotlib.artist.Artist.set_contains" title="matplotlib.artist.Artist.set_contains"><code class="xref py py-meth docutils literal notranslate"><span class="pre">contains</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_facecolor.html#matplotlib.axes.Axes.set_facecolor" title="matplotlib.axes.Axes.set_facecolor"><code class="xref py py-meth docutils literal notranslate"><span class="pre">facecolor</span></code></a> or fc</td>
<td>color</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_figure.html#matplotlib.artist.Artist.set_figure" title="matplotlib.artist.Artist.set_figure"><code class="xref py py-meth docutils literal notranslate"><span class="pre">figure</span></code></a></td>
<td><a class="reference internal" href="#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure</span></code></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_frame_on.html#matplotlib.axes.Axes.set_frame_on" title="matplotlib.axes.Axes.set_frame_on"><code class="xref py py-meth docutils literal notranslate"><span class="pre">frame_on</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_gid.html#matplotlib.artist.Artist.set_gid" title="matplotlib.artist.Artist.set_gid"><code class="xref py py-meth docutils literal notranslate"><span class="pre">gid</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_in_layout.html#matplotlib.artist.Artist.set_in_layout" title="matplotlib.artist.Artist.set_in_layout"><code class="xref py py-meth docutils literal notranslate"><span class="pre">in_layout</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_label.html#matplotlib.artist.Artist.set_label" title="matplotlib.artist.Artist.set_label"><code class="xref py py-meth docutils literal notranslate"><span class="pre">label</span></code></a></td>
<td>object</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_navigate.html#matplotlib.axes.Axes.set_navigate" title="matplotlib.axes.Axes.set_navigate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">navigate</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_navigate_mode.html#matplotlib.axes.Axes.set_navigate_mode" title="matplotlib.axes.Axes.set_navigate_mode"><code class="xref py py-meth docutils literal notranslate"><span class="pre">navigate_mode</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_path_effects.html#matplotlib.artist.Artist.set_path_effects" title="matplotlib.artist.Artist.set_path_effects"><code class="xref py py-meth docutils literal notranslate"><span class="pre">path_effects</span></code></a></td>
<td><a class="reference internal" href="patheffects_api.html#matplotlib.patheffects.AbstractPathEffect" title="matplotlib.patheffects.AbstractPathEffect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AbstractPathEffect</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_picker.html#matplotlib.artist.Artist.set_picker" title="matplotlib.artist.Artist.set_picker"><code class="xref py py-meth docutils literal notranslate"><span class="pre">picker</span></code></a></td>
<td>None or bool or float or callable</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_position.html#matplotlib.axes.Axes.set_position" title="matplotlib.axes.Axes.set_position"><code class="xref py py-meth docutils literal notranslate"><span class="pre">position</span></code></a></td>
<td>[left, bottom, width, height] or <a class="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Bbox</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_prop_cycle.html#matplotlib.axes.Axes.set_prop_cycle" title="matplotlib.axes.Axes.set_prop_cycle"><code class="xref py py-meth docutils literal notranslate"><span class="pre">prop_cycle</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_rasterization_zorder.html#matplotlib.axes.Axes.set_rasterization_zorder" title="matplotlib.axes.Axes.set_rasterization_zorder"><code class="xref py py-meth docutils literal notranslate"><span class="pre">rasterization_zorder</span></code></a></td>
<td>float or None</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_rasterized.html#matplotlib.artist.Artist.set_rasterized" title="matplotlib.artist.Artist.set_rasterized"><code class="xref py py-meth docutils literal notranslate"><span class="pre">rasterized</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_sketch_params.html#matplotlib.artist.Artist.set_sketch_params" title="matplotlib.artist.Artist.set_sketch_params"><code class="xref py py-meth docutils literal notranslate"><span class="pre">sketch_params</span></code></a></td>
<td>(scale: float, length: float, randomness: float)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_snap.html#matplotlib.artist.Artist.set_snap" title="matplotlib.artist.Artist.set_snap"><code class="xref py py-meth docutils literal notranslate"><span class="pre">snap</span></code></a></td>
<td>bool or None</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_title.html#matplotlib.axes.Axes.set_title" title="matplotlib.axes.Axes.set_title"><code class="xref py py-meth docutils literal notranslate"><span class="pre">title</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_transform.html#matplotlib.artist.Artist.set_transform" title="matplotlib.artist.Artist.set_transform"><code class="xref py py-meth docutils literal notranslate"><span class="pre">transform</span></code></a></td>
<td><a class="reference internal" href="transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Transform</span></code></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_url.html#matplotlib.artist.Artist.set_url" title="matplotlib.artist.Artist.set_url"><code class="xref py py-meth docutils literal notranslate"><span class="pre">url</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_visible.html#matplotlib.artist.Artist.set_visible" title="matplotlib.artist.Artist.set_visible"><code class="xref py py-meth docutils literal notranslate"><span class="pre">visible</span></code></a></td>
<td>bool</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xbound.html#matplotlib.axes.Axes.set_xbound" title="matplotlib.axes.Axes.set_xbound"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xbound</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xlabel.html#matplotlib.axes.Axes.set_xlabel" title="matplotlib.axes.Axes.set_xlabel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xlabel</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xlim.html#matplotlib.axes.Axes.set_xlim" title="matplotlib.axes.Axes.set_xlim"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xlim</span></code></a></td>
<td>(bottom: float, top: float)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xmargin.html#matplotlib.axes.Axes.set_xmargin" title="matplotlib.axes.Axes.set_xmargin"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xmargin</span></code></a></td>
<td>float greater than -0.5</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xscale.html#matplotlib.axes.Axes.set_xscale" title="matplotlib.axes.Axes.set_xscale"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xscale</span></code></a></td>
<td>{"linear", "log", "symlog", "logit", ...} or <a class="reference internal" href="scale_api.html#matplotlib.scale.ScaleBase" title="matplotlib.scale.ScaleBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ScaleBase</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xticklabels.html#matplotlib.axes.Axes.set_xticklabels" title="matplotlib.axes.Axes.set_xticklabels"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xticklabels</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_xticks.html#matplotlib.axes.Axes.set_xticks" title="matplotlib.axes.Axes.set_xticks"><code class="xref py py-meth docutils literal notranslate"><span class="pre">xticks</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_ybound.html#matplotlib.axes.Axes.set_ybound" title="matplotlib.axes.Axes.set_ybound"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ybound</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_ylabel.html#matplotlib.axes.Axes.set_ylabel" title="matplotlib.axes.Axes.set_ylabel"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ylabel</span></code></a></td>
<td>str</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_ylim.html#matplotlib.axes.Axes.set_ylim" title="matplotlib.axes.Axes.set_ylim"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ylim</span></code></a></td>
<td>(bottom: float, top: float)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_ymargin.html#matplotlib.axes.Axes.set_ymargin" title="matplotlib.axes.Axes.set_ymargin"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ymargin</span></code></a></td>
<td>float greater than -0.5</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_yscale.html#matplotlib.axes.Axes.set_yscale" title="matplotlib.axes.Axes.set_yscale"><code class="xref py py-meth docutils literal notranslate"><span class="pre">yscale</span></code></a></td>
<td>{"linear", "log", "symlog", "logit", ...} or <a class="reference internal" href="scale_api.html#matplotlib.scale.ScaleBase" title="matplotlib.scale.ScaleBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ScaleBase</span></code></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_yticklabels.html#matplotlib.axes.Axes.set_yticklabels" title="matplotlib.axes.Axes.set_yticklabels"><code class="xref py py-meth docutils literal notranslate"><span class="pre">yticklabels</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="_as_gen/matplotlib.axes.Axes.set_yticks.html#matplotlib.axes.Axes.set_yticks" title="matplotlib.axes.Axes.set_yticks"><code class="xref py py-meth docutils literal notranslate"><span class="pre">yticks</span></code></a></td>
<td>unknown</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="_as_gen/matplotlib.artist.Artist.set_zorder.html#matplotlib.artist.Artist.set_zorder" title="matplotlib.artist.Artist.set_zorder"><code class="xref py py-meth docutils literal notranslate"><span class="pre">zorder</span></code></a></td>
<td>float</td>
</tr>
</tbody>
</table>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#matplotlib.figure.Figure.add_axes" title="matplotlib.figure.Figure.add_axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.add_axes</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="_as_gen/matplotlib.pyplot.subplot.html#matplotlib.pyplot.subplot" title="matplotlib.pyplot.subplot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.subplot</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="_as_gen/matplotlib.pyplot.axes.html#matplotlib.pyplot.axes" title="matplotlib.pyplot.axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.axes</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="#matplotlib.figure.Figure.subplots" title="matplotlib.figure.Figure.subplots"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.subplots</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="_as_gen/matplotlib.pyplot.subplots.html#matplotlib.pyplot.subplots" title="matplotlib.pyplot.subplots"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.subplots</span></code></a></dt><dd></dd>
</dl>
</div>
<p class="rubric">Examples</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fig</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">()</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">231</span><span class="p">)</span>
<span class="n">ax1</span> <span class="o">=</span> <span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="c1"># equivalent but more general</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">232</span><span class="p">,</span> <span class="n">frameon</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="c1"># subplot with no frame</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">233</span><span class="p">,</span> <span class="n">projection</span><span class="o">=</span><span class="s1">'polar'</span><span class="p">)</span> <span class="c1"># polar subplot</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">234</span><span class="p">,</span> <span class="n">sharex</span><span class="o">=</span><span class="n">ax1</span><span class="p">)</span> <span class="c1"># subplot sharing x-axis with ax1</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">235</span><span class="p">,</span> <span class="n">facecolor</span><span class="o">=</span><span class="s2">"red"</span><span class="p">)</span> <span class="c1"># red subplot</span>
<span class="n">ax1</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span> <span class="c1"># delete ax1 from the figure</span>
<span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="n">ax1</span><span class="p">)</span> <span class="c1"># add ax1 back to the figure</span>
</pre></div>
</div>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.align_labels">
<code class="descname">align_labels</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">axs</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.align_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Align the xlabels and ylabels of subplots with the same subplots
row or column (respectively) if label alignment is being
done automatically (i.e. the label position is not manually set).</p>
<p>Alignment persists for draw events after this is called.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>axs</strong><span class="classifier">list of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a></span></dt><dd><p>Optional list (or ndarray) of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>
to align the labels.
Default is to align all Axes on the figure.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#matplotlib.figure.Figure.align_xlabels" title="matplotlib.figure.Figure.align_xlabels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.figure.Figure.align_xlabels</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="#matplotlib.figure.Figure.align_ylabels" title="matplotlib.figure.Figure.align_ylabels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.figure.Figure.align_ylabels</span></code></a></dt><dd></dd>
</dl>
</div>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.align_xlabels">
<code class="descname">align_xlabels</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">axs</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.align_xlabels" title="Permalink to this definition">¶</a></dt>
<dd><p>Align the xlabels of subplots in the same subplot column if label
alignment is being done automatically (i.e. the label position is
not manually set).</p>
<p>Alignment persists for draw events after this is called.</p>
<p>If a label is on the bottom, it is aligned with labels on Axes that
also have their label on the bottom and that have the same
bottom-most subplot row. If the label is on the top,
it is aligned with labels on Axes with the same top-most row.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>axs</strong><span class="classifier">list of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a></span></dt><dd><p>Optional list of (or ndarray) <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>
to align the xlabels.
Default is to align all Axes on the figure.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#matplotlib.figure.Figure.align_ylabels" title="matplotlib.figure.Figure.align_ylabels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.figure.Figure.align_ylabels</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="#matplotlib.figure.Figure.align_labels" title="matplotlib.figure.Figure.align_labels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.figure.Figure.align_labels</span></code></a></dt><dd></dd>
</dl>
</div>
<p class="rubric">Notes</p>
<p>This assumes that <code class="docutils literal notranslate"><span class="pre">axs</span></code> are from the same <a class="reference internal" href="_as_gen/matplotlib.gridspec.GridSpec.html#matplotlib.gridspec.GridSpec" title="matplotlib.gridspec.GridSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GridSpec</span></code></a>, so that
their <a class="reference internal" href="_as_gen/matplotlib.gridspec.SubplotSpec.html#matplotlib.gridspec.SubplotSpec" title="matplotlib.gridspec.SubplotSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotSpec</span></code></a> positions correspond to figure positions.</p>
<p class="rubric">Examples</p>
<p>Example with rotated xtick labels:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fig</span><span class="p">,</span> <span class="n">axs</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="k">for</span> <span class="n">tick</span> <span class="ow">in</span> <span class="n">axs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">get_xticklabels</span><span class="p">():</span>
<span class="n">tick</span><span class="o">.</span><span class="n">set_rotation</span><span class="p">(</span><span class="mi">55</span><span class="p">)</span>
<span class="n">axs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">set_xlabel</span><span class="p">(</span><span class="s1">'XLabel 0'</span><span class="p">)</span>
<span class="n">axs</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">set_xlabel</span><span class="p">(</span><span class="s1">'XLabel 1'</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">align_xlabels</span><span class="p">()</span>
</pre></div>
</div>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.align_ylabels">
<code class="descname">align_ylabels</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">axs</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.align_ylabels" title="Permalink to this definition">¶</a></dt>
<dd><p>Align the ylabels of subplots in the same subplot column if label
alignment is being done automatically (i.e. the label position is
not manually set).</p>
<p>Alignment persists for draw events after this is called.</p>
<p>If a label is on the left, it is aligned with labels on Axes that
also have their label on the left and that have the same
left-most subplot column. If the label is on the right,
it is aligned with labels on Axes with the same right-most column.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>axs</strong><span class="classifier">list of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a></span></dt><dd><p>Optional list (or ndarray) of <a class="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes</span></code></a>
to align the ylabels.
Default is to align all Axes on the figure.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#matplotlib.figure.Figure.align_xlabels" title="matplotlib.figure.Figure.align_xlabels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.figure.Figure.align_xlabels</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="#matplotlib.figure.Figure.align_labels" title="matplotlib.figure.Figure.align_labels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.figure.Figure.align_labels</span></code></a></dt><dd></dd>
</dl>
</div>
<p class="rubric">Notes</p>
<p>This assumes that <code class="docutils literal notranslate"><span class="pre">axs</span></code> are from the same <a class="reference internal" href="_as_gen/matplotlib.gridspec.GridSpec.html#matplotlib.gridspec.GridSpec" title="matplotlib.gridspec.GridSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GridSpec</span></code></a>, so that
their <a class="reference internal" href="_as_gen/matplotlib.gridspec.SubplotSpec.html#matplotlib.gridspec.SubplotSpec" title="matplotlib.gridspec.SubplotSpec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotSpec</span></code></a> positions correspond to figure positions.</p>
<p class="rubric">Examples</p>
<p>Example with large yticks labels:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fig</span><span class="p">,</span> <span class="n">axs</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">axs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1000</span><span class="p">,</span> <span class="mi">50</span><span class="p">))</span>
<span class="n">axs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s1">'YLabel 0'</span><span class="p">)</span>
<span class="n">axs</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s1">'YLabel 1'</span><span class="p">)</span>
<span class="n">fig</span><span class="o">.</span><span class="n">align_ylabels</span><span class="p">()</span>
</pre></div>
</div>
</dd></dl>
<dl class="py method">
<dt id="matplotlib.figure.Figure.autofmt_xdate">
<code class="descname">autofmt_xdate</code><span class="sig-paren">(</span><em><span class="n">self</span></em>, <em><span class="n">bottom</span><span class="o">=</span><span class="default_value">0.2</span></em>, <em><span class="n">rotation</span><span class="o">=</span><span class="default_value">30</span></em>, <em><span class="n">ha</span><span class="o">=</span><span class="default_value">'right'</span></em>, <em><span class="n">which</span><span class="o">=</span><span class="default_value">'major'</span></em><span class="sig-paren">)</span><a class="headerlink" href="#matplotlib.figure.Figure.autofmt_xdate" title="Permalink to this definition">¶</a></dt>
<dd><p>Date ticklabels often overlap, so it is useful to rotate them
and right align them. Also, a common use case is a number of
subplots with shared x-axis where the x-axis is date data. The
ticklabels are often long, and it helps to rotate them on the