-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathapi_changes.html
More file actions
1154 lines (1129 loc) · 143 KB
/
api_changes.html
File metadata and controls
1154 lines (1129 loc) · 143 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>API Changes — 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="Old API Changes" href="api_changes_old.html" />
<link rel="prev" title="API Overview" href="index.html" />
<link rel="top" title="Matplotlib 3.4.2 documentation" href="#" />
<link rel="canonical" href="https://matplotlib.org/3.4.3/api/api_changes.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="/stable/">https://matplotlib.org/stable/</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="api_changes_old.html" title="Old API Changes"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="API Overview"
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="">API Changes</a></li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">API Changes</a><ul>
<li><a class="reference internal" href="#api-changes-for-3-4-2">API Changes for 3.4.2</a><ul>
<li><a class="reference internal" href="#behaviour-changes">Behaviour changes</a><ul>
<li><a class="reference internal" href="#rename-first-argument-to-subplot-mosaic">Rename first argument to <code class="docutils literal notranslate"><span class="pre">subplot_mosaic</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#api-changes-for-3-4-0">API Changes for 3.4.0</a><ul>
<li><a class="reference internal" href="#id1">Behaviour changes</a><ul>
<li><a class="reference internal" href="#constrained-layout-rewrite">Constrained layout rewrite</a></li>
<li><a class="reference internal" href="#plt-subplot-re-selection-without-keyword-arguments"><code class="docutils literal notranslate"><span class="pre">plt.subplot</span></code> re-selection without keyword arguments</a></li>
<li><a class="reference internal" href="#ioff-and-ion-can-be-used-as-context-managers"><code class="docutils literal notranslate"><span class="pre">ioff</span></code> and <code class="docutils literal notranslate"><span class="pre">ion</span></code> can be used as context managers</a></li>
<li><a class="reference internal" href="#locators-and-formatters-must-be-in-the-class-hierarchy">Locators and formatters must be in the class hierarchy</a></li>
<li><a class="reference internal" href="#date-locator-for-daily-interval-now-returns-middle-of-month">Date locator for DAILY interval now returns middle of month</a></li>
<li><a class="reference internal" href="#scalarformatter-uselocale-option-obeys-grouping"><code class="docutils literal notranslate"><span class="pre">ScalarFormatter</span></code> <em>useLocale</em> option obeys grouping</a></li>
<li><a class="reference internal" href="#axes-errorbar-cycles-non-color-properties-correctly"><code class="docutils literal notranslate"><span class="pre">Axes.errorbar</span></code> cycles non-color properties correctly</a></li>
<li><a class="reference internal" href="#pyplot-specgram-always-uses-origin-upper">pyplot.specgram always uses origin='upper'</a></li>
<li><a class="reference internal" href="#xunits-none-and-yunits-none-passed-as-keyword-arguments-are-treated-as-no-action">xunits=None and yunits=None passed as keyword arguments are treated as "no action"</a></li>
<li><a class="reference internal" href="#annotations-with-annotation-clip-no-longer-affect-tight-layout">Annotations with <code class="docutils literal notranslate"><span class="pre">annotation_clip</span></code> no longer affect <code class="docutils literal notranslate"><span class="pre">tight_layout</span></code></a></li>
<li><a class="reference internal" href="#parasite-axes-pcolor-and-pcolormesh-now-defaults-to-placing-grid-edges-at-integers-not-half-integers">Parasite Axes pcolor and pcolormesh now defaults to placing grid edges at integers, not half-integers</a></li>
<li><a class="reference internal" href="#colorbar-outline-is-now-a-spine"><code class="docutils literal notranslate"><span class="pre">Colorbar</span></code> outline is now a <code class="docutils literal notranslate"><span class="pre">Spine</span></code></a></li>
<li><a class="reference internal" href="#colorbar-dividers-changes"><code class="docutils literal notranslate"><span class="pre">Colorbar.dividers</span></code> changes</a></li>
<li><a class="reference internal" href="#raise-or-warn-on-registering-a-colormap-twice">Raise or warn on registering a colormap twice</a></li>
<li><a class="reference internal" href="#consecutive-rasterized-draws-now-merged">Consecutive rasterized draws now merged</a></li>
<li><a class="reference internal" href="#consistent-behavior-of-draw-if-interactive-across-backends">Consistent behavior of <code class="docutils literal notranslate"><span class="pre">draw_if_interactive()</span></code> across backends</a></li>
<li><a class="reference internal" href="#the-artist-property-rasterized-cannot-be-none-anymore">The Artist property <em>rasterized</em> cannot be <em>None</em> anymore</a></li>
<li><a class="reference internal" href="#canvas-s-callback-registry-now-stored-on-figure">Canvas's callback registry now stored on Figure</a></li>
<li><a class="reference internal" href="#harmonized-key-event-data-across-backends">Harmonized key event data across backends</a></li>
<li><a class="reference internal" href="#webagg-backend-no-longer-reports-a-middle-click-as-a-right-click">WebAgg backend no longer reports a middle click as a right click</a></li>
<li><a class="reference internal" href="#id-attribute-of-xml-tags-in-svg-files-now-based-on-sha256-rather-than-md5">ID attribute of XML tags in SVG files now based on SHA256 rather than MD5</a></li>
<li><a class="reference internal" href="#rendererps-set-font-is-no-longer-a-no-op-in-afm-mode"><code class="docutils literal notranslate"><span class="pre">RendererPS.set_font</span></code> is no longer a no-op in AFM mode</a></li>
<li><a class="reference internal" href="#autoscaling-in-axes3d">Autoscaling in Axes3D</a></li>
<li><a class="reference internal" href="#axes3d-automatically-adding-itself-to-figure-is-deprecated">Axes3D automatically adding itself to Figure is deprecated</a></li>
<li><a class="reference internal" href="#mplot3d-art3d-get-dir-vector-always-returns-numpy-arrays"><code class="docutils literal notranslate"><span class="pre">mplot3d.art3d.get_dir_vector</span></code> always returns NumPy arrays</a></li>
<li><a class="reference internal" href="#changed-cursive-and-fantasy-font-definitions">Changed cursive and fantasy font definitions</a></li>
<li><a class="reference internal" href="#docstring-substitution-now-always-dedents-docstrings-before-string-interpolation">docstring.Substitution now always dedents docstrings before string interpolation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#deprecations">Deprecations</a><ul>
<li><a class="reference internal" href="#extra-parameters-to-axes-constructor">Extra parameters to Axes constructor</a></li>
<li><a class="reference internal" href="#pyplot-gca-and-figure-gca-keyword-arguments"><code class="docutils literal notranslate"><span class="pre">pyplot.gca</span></code> and <code class="docutils literal notranslate"><span class="pre">Figure.gca</span></code> keyword arguments</a></li>
<li><a class="reference internal" href="#axis-cla-radialaxis-cla-thetaaxis-cla-and-spine-cla"><code class="docutils literal notranslate"><span class="pre">Axis.cla</span></code>, <code class="docutils literal notranslate"><span class="pre">RadialAxis.cla</span></code>, <code class="docutils literal notranslate"><span class="pre">ThetaAxis.cla</span></code> and <code class="docutils literal notranslate"><span class="pre">Spine.cla</span></code></a></li>
<li><a class="reference internal" href="#invalid-hatch-pattern-characters-are-no-longer-ignored">Invalid hatch pattern characters are no longer ignored</a></li>
<li><a class="reference internal" href="#imread-reading-from-urls"><code class="docutils literal notranslate"><span class="pre">imread</span></code> reading from URLs</a></li>
<li><a class="reference internal" href="#subplot-related-attributes-and-methods">Subplot-related attributes and methods</a></li>
<li><a class="reference internal" href="#is-url-and-url-regex"><code class="docutils literal notranslate"><span class="pre">is_url</span></code> and <code class="docutils literal notranslate"><span class="pre">URL_REGEX</span></code></a></li>
<li><a class="reference internal" href="#matplotlib-style-core-deprecations"><code class="docutils literal notranslate"><span class="pre">matplotlib.style.core</span></code> deprecations</a></li>
<li><a class="reference internal" href="#tick-apply-tickdir-is-deprecated"><code class="docutils literal notranslate"><span class="pre">Tick.apply_tickdir</span></code> is deprecated</a></li>
<li><a class="reference internal" href="#dpi-cor-property-of-fancyarrowpatch"><code class="docutils literal notranslate"><span class="pre">dpi_cor</span></code> property of <code class="xref py py-obj docutils literal notranslate"><span class="pre">FancyArrowPatch</span></code></a></li>
<li><a class="reference internal" href="#passing-boxstyle-custom-bbox-transmuter-to-fancybboxpatch">Passing <code class="docutils literal notranslate"><span class="pre">boxstyle="custom",</span> <span class="pre">bbox_transmuter=...</span></code> to <code class="docutils literal notranslate"><span class="pre">FancyBboxPatch</span></code></a></li>
<li><a class="reference internal" href="#boxstyles-are-now-called-without-passing-the-mutation-aspect-parameter">BoxStyles are now called without passing the <em>mutation_aspect</em> parameter</a></li>
<li><a class="reference internal" href="#contourlabeler-get-label-coords-is-deprecated"><code class="docutils literal notranslate"><span class="pre">ContourLabeler.get_label_coords</span></code> is deprecated</a></li>
<li><a class="reference internal" href="#line2d-and-patch-no-longer-duplicate-validjoin-and-validcap">Line2D and Patch no longer duplicate <code class="docutils literal notranslate"><span class="pre">validJoin</span></code> and <code class="docutils literal notranslate"><span class="pre">validCap</span></code></a></li>
<li><a class="reference internal" href="#setting-a-line2d-s-pickradius-via-set-picker-is-undeprecated">Setting a Line2D's pickradius via <code class="docutils literal notranslate"><span class="pre">set_picker</span></code> is undeprecated</a></li>
<li><a class="reference internal" href="#markerstyle-is-considered-immutable"><code class="docutils literal notranslate"><span class="pre">MarkerStyle</span></code> is considered immutable</a></li>
<li><a class="reference internal" href="#moviewriter-cleanup-is-deprecated"><code class="docutils literal notranslate"><span class="pre">MovieWriter.cleanup</span></code> is deprecated</a></li>
<li><a class="reference internal" href="#minimumdescent-parameter-property-of-textarea"><em>minimumdescent</em> parameter/property of <code class="docutils literal notranslate"><span class="pre">TextArea</span></code></a></li>
<li><a class="reference internal" href="#colorbar-now-warns-when-the-mappable-s-axes-is-different-from-the-current-axes"><code class="docutils literal notranslate"><span class="pre">colorbar</span></code> now warns when the mappable's Axes is different from the current Axes</a></li>
<li><a class="reference internal" href="#colorbar-docstrings">Colorbar docstrings</a></li>
<li><a class="reference internal" href="#colorbarpatch-and-colorbar-factory-are-deprecated"><code class="docutils literal notranslate"><span class="pre">ColorbarPatch</span></code> and <code class="docutils literal notranslate"><span class="pre">colorbar_factory</span></code> are deprecated</a></li>
<li><a class="reference internal" href="#backend-deprecations">Backend deprecations</a></li>
<li><a class="reference internal" href="#wx-backend-cleanups">wx backend cleanups</a></li>
<li><a class="reference internal" href="#unused-positional-parameters-to-print-fmt-methods-are-deprecated">Unused positional parameters to <code class="docutils literal notranslate"><span class="pre">print_<fmt></span></code> methods are deprecated</a></li>
<li><a class="reference internal" href="#the-dpi-parameter-of-figurecanvas-print-foo-printers-is-deprecated">The <em>dpi</em> parameter of <code class="docutils literal notranslate"><span class="pre">FigureCanvas.print_foo</span></code> printers is deprecated</a></li>
<li><a class="reference internal" href="#passing-bytes-to-ft2font-set-text">Passing <code class="xref py py-obj docutils literal notranslate"><span class="pre">bytes</span></code> to <code class="docutils literal notranslate"><span class="pre">FT2Font.set_text</span></code></a></li>
<li><a class="reference internal" href="#ps-useafm-deprecated-for-mathtext"><code class="docutils literal notranslate"><span class="pre">ps.useafm</span></code> deprecated for mathtext</a></li>
<li><a class="reference internal" href="#mathtextparser-bitmap-is-deprecated"><code class="docutils literal notranslate"><span class="pre">MathTextParser("bitmap")</span></code> is deprecated</a></li>
<li><a class="reference internal" href="#deprecation-of-mathtext-internals">Deprecation of mathtext internals</a></li>
<li><a class="reference internal" href="#deprecation-of-various-mathtext-helpers">Deprecation of various mathtext helpers</a></li>
<li><a class="reference internal" href="#widget-class-internals">Widget class internals</a></li>
<li><a class="reference internal" href="#d-properties-on-renderers">3D properties on renderers</a></li>
<li><a class="reference internal" href="#renderer-argument-of-do-3d-projection-method-for-collection3d-patch3d"><em>renderer</em> argument of <code class="docutils literal notranslate"><span class="pre">do_3d_projection</span></code> method for <code class="docutils literal notranslate"><span class="pre">Collection3D</span></code>/<code class="docutils literal notranslate"><span class="pre">Patch3D</span></code></a></li>
<li><a class="reference internal" href="#project-argument-of-draw-method-for-line3dcollection"><em>project</em> argument of <code class="docutils literal notranslate"><span class="pre">draw</span></code> method for <code class="docutils literal notranslate"><span class="pre">Line3DCollection</span></code></a></li>
<li><a class="reference internal" href="#extra-positional-parameters-to-plot-surface-and-plot-wireframe">Extra positional parameters to <code class="docutils literal notranslate"><span class="pre">plot_surface</span></code> and <code class="docutils literal notranslate"><span class="pre">plot_wireframe</span></code></a></li>
<li><a class="reference internal" href="#parasiteaxesauxtransbase-class"><code class="docutils literal notranslate"><span class="pre">ParasiteAxesAuxTransBase</span></code> class</a></li>
<li><a class="reference internal" href="#axisartist-zorder-attribute"><code class="docutils literal notranslate"><span class="pre">AxisArtist.ZORDER</span></code> attribute</a></li>
<li><a class="reference internal" href="#gridhelperbase-invalidation"><code class="docutils literal notranslate"><span class="pre">GridHelperBase</span></code> invalidation</a></li>
<li><a class="reference internal" href="#sphinext-plot-directive-align"><code class="docutils literal notranslate"><span class="pre">sphinext.plot_directive.align</span></code></a></li>
<li><a class="reference internal" href="#deprecation-related-functionality-is-considered-internal">Deprecation-related functionality is considered internal</a></li>
</ul>
</li>
<li><a class="reference internal" href="#removals">Removals</a><ul>
<li><a class="reference internal" href="#removed-behaviour">Removed behaviour</a></li>
<li><a class="reference internal" href="#modules">Modules</a></li>
<li><a class="reference internal" href="#classes-methods-and-attributes">Classes, methods and attributes</a></li>
<li><a class="reference internal" href="#functions">Functions</a></li>
<li><a class="reference internal" href="#arguments">Arguments</a></li>
<li><a class="reference internal" href="#rcparams">rcParams</a></li>
<li><a class="reference internal" href="#sample-data-removals">sample_data removals</a></li>
</ul>
</li>
<li><a class="reference internal" href="#development-changes">Development changes</a><ul>
<li><a class="reference internal" href="#increase-to-minimum-supported-versions-of-python-and-dependencies">Increase to minimum supported versions of Python and dependencies</a></li>
<li><a class="reference internal" href="#qhull-downloaded-at-build-or-sdist-time">Qhull downloaded at build-or-sdist time</a></li>
<li><a class="reference internal" href="#figurebase-class-added-and-figure-class-made-a-child"><code class="docutils literal notranslate"><span class="pre">FigureBase</span></code> class added, and <code class="docutils literal notranslate"><span class="pre">Figure</span></code> class made a child</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<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/api_changes.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="api-changes">
<h1>API Changes<a class="headerlink" href="#api-changes" title="Permalink to this headline">¶</a></h1>
<p>If updating Matplotlib breaks your scripts, this list may help you figure out
what caused the breakage and how to fix it by updating your code.</p>
<p>For API changes in older versions see</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="api_changes_old.html">Old API Changes</a></li>
</ul>
</div>
<p>Changes for the latest version are listed below. For new features that were
added to Matplotlib, see <a class="reference internal" href="../users/whats_new.html#whats-new"><span class="std std-ref">What's new?</span></a></p>
<div class="section" id="api-changes-for-3-4-2">
<h2>API Changes for 3.4.2<a class="headerlink" href="#api-changes-for-3-4-2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="behaviour-changes">
<h3>Behaviour changes<a class="headerlink" href="#behaviour-changes" title="Permalink to this headline">¶</a></h3>
<div class="section" id="rename-first-argument-to-subplot-mosaic">
<h4>Rename first argument to <code class="docutils literal notranslate"><span class="pre">subplot_mosaic</span></code><a class="headerlink" href="#rename-first-argument-to-subplot-mosaic" title="Permalink to this headline">¶</a></h4>
<p>Both <a class="reference internal" href="figure_api.html#matplotlib.figure.FigureBase.subplot_mosaic" title="matplotlib.figure.FigureBase.subplot_mosaic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureBase.subplot_mosaic</span></code></a>, and <a class="reference internal" href="_as_gen/matplotlib.pyplot.subplot_mosaic.html#matplotlib.pyplot.subplot_mosaic" title="matplotlib.pyplot.subplot_mosaic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.subplot_mosaic</span></code></a> have had the
first position argument renamed from <em>layout</em> to <em>mosaic</em>. This is because we
are considering to consolidate <em>constrained_layout</em> and <em>tight_layout</em> keyword
arguments in the Figure creation functions of <a class="reference internal" href="_as_gen/matplotlib.pyplot.html#module-matplotlib.pyplot" title="matplotlib.pyplot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot</span></code></a> into a single <em>layout</em>
keyword argument which would collide.</p>
<p>As this API is provisional, we are changing this with no deprecation period.</p>
</div>
</div>
</div>
<div class="section" id="api-changes-for-3-4-0">
<h2>API Changes for 3.4.0<a class="headerlink" href="#api-changes-for-3-4-0" title="Permalink to this headline">¶</a></h2>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#id1" id="id3">Behaviour changes</a></li>
<li><a class="reference internal" href="#deprecations" id="id4">Deprecations</a></li>
<li><a class="reference internal" href="#removals" id="id5">Removals</a></li>
<li><a class="reference internal" href="#development-changes" id="id6">Development changes</a></li>
</ul>
</div>
<div class="section" id="id1">
<h3><a class="toc-backref" href="#id3">Behaviour changes</a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
<div class="section" id="constrained-layout-rewrite">
<h4>Constrained layout rewrite<a class="headerlink" href="#constrained-layout-rewrite" title="Permalink to this headline">¶</a></h4>
<p>The layout manager <code class="docutils literal notranslate"><span class="pre">constrained_layout</span></code> was re-written with different outer
constraints that should be more robust to complicated subplot layouts.
User-facing changes are:</p>
<ul class="simple">
<li>some poorly constrained layouts will have different width/height plots than
before.</li>
<li>colorbars now respect the <code class="docutils literal notranslate"><span class="pre">anchor</span></code> keyword argument of
<a class="reference internal" href="colorbar_api.html#matplotlib.colorbar.make_axes" title="matplotlib.colorbar.make_axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.colorbar.make_axes</span></code></a></li>
<li>colorbars are wider.</li>
<li>colorbars in different rows or columns line up more robustly.</li>
<li><em>hspace</em> and <em>wspace</em> options to <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure.set_constrained_layout_pads" title="matplotlib.figure.Figure.set_constrained_layout_pads"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.set_constrained_layout_pads</span></code></a> were
twice as wide as the docs said they should be. So these now follow the docs.</li>
</ul>
<p>This feature will remain "experimental" until the new changes have been used
enough by users, so we anticipate version 3.5 or 3.6. On the other hand,
<code class="docutils literal notranslate"><span class="pre">constrained_layout</span></code> is extensively tested and used in examples in the
library, so using it should be safe, but layouts may not be exactly the same as
more development takes place.</p>
<p>Details of using <code class="docutils literal notranslate"><span class="pre">constrained_layout</span></code>, and its algorithm are available at
<a class="reference internal" href="../tutorials/intermediate/constrainedlayout_guide.html"><span class="doc">Constrained Layout Guide</span></a></p>
</div>
<div class="section" id="plt-subplot-re-selection-without-keyword-arguments">
<h4><code class="docutils literal notranslate"><span class="pre">plt.subplot</span></code> re-selection without keyword arguments<a class="headerlink" href="#plt-subplot-re-selection-without-keyword-arguments" title="Permalink to this headline">¶</a></h4>
<p>The purpose of <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> is to facilitate creating and re-selecting
Axes in a Figure when working strictly in the implicit pyplot API. When
creating new Axes it is possible to select the projection (e.g. polar, 3D, or
various cartographic projections) as well as to pass additional keyword
arguments through to the Axes-subclass that is created.</p>
<p>The first time <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> is called for a given position in the Axes
grid it always creates and returns a new Axes with the passed arguments and
projection (defaulting to rectilinear). On subsequent calls to
<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> we have to determine if an existing Axes has a) equivalent
parameters, in which case it should be selected as the current Axes and
returned, or b) different parameters, in which case a new Axes is created and
the existing Axes is removed. This leaves the question of what is "equivalent
parameters".</p>
<p>Previously it was the case that an existing Axes subclass, except for Axes3D,
would be considered equivalent to a 2D rectilinear Axes, despite having
different projections, if the keyword arguments (other than <em>projection</em>)
matched. Thus:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ax1</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</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">ax2</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">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">ax1</span> <span class="ow">is</span> <span class="n">ax2</span>
</pre></div>
</div>
<p>We are embracing this long standing behavior to ensure that in the case when no
keyword arguments (of any sort) are passed to <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> any existing
Axes is returned, without consideration for keywords or projection used to
initially create it. This will cause a change in behavior when additional
keywords were passed to the original Axes:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ax1</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">111</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">theta_offset</span><span class="o">=.</span><span class="mi">75</span><span class="p">)</span>
<span class="n">ax2</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">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">ax1</span> <span class="ow">is</span> <span class="n">ax2</span> <span class="c1"># new behavior</span>
<span class="c1"># ax1 is not ax2 # old behavior, made a new axes</span>
<span class="n">ax1</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="mi">111</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s1">'test'</span><span class="p">)</span>
<span class="n">ax2</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">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">ax1</span> <span class="ow">is</span> <span class="n">ax2</span> <span class="c1"># new behavior</span>
<span class="c1"># ax1 is not ax2 # old behavior, made a new axes</span>
</pre></div>
</div>
<p>For the same reason, if there was an existing Axes that was not rectilinear,
passing <code class="docutils literal notranslate"><span class="pre">projection='rectilinear'</span></code> would reuse the existing Axes</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ax1</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplot</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">ax2</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="n">projection</span><span class="o">=</span><span class="s1">'rectilinear'</span><span class="p">)</span>
<span class="n">ax1</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">ax2</span> <span class="c1"># new behavior, makes new Axes</span>
<span class="c1"># ax1 is ax2 # old behavior</span>
</pre></div>
</div>
<p>contrary to the user's request.</p>
<p>Previously Axes3D could not be re-selected with <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> due to an
unrelated bug (also fixed in Matplotlib 3.4). While Axes3D are now consistent
with all other projections there is a change in behavior for</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="n">projection</span><span class="o">=</span><span class="s1">'3d'</span><span class="p">)</span> <span class="c1"># create a 3D Axes</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">()</span> <span class="c1"># now returns existing 3D Axes, but</span>
<span class="c1"># previously created new 2D Axes</span>
<span class="n">plt</span><span class="o">.</span><span class="n">subplot</span><span class="p">(</span><span class="n">projection</span><span class="o">=</span><span class="s1">'rectilinear'</span><span class="p">)</span> <span class="c1"># to get a new 2D Axes</span>
</pre></div>
</div>
</div>
<div class="section" id="ioff-and-ion-can-be-used-as-context-managers">
<h4><code class="docutils literal notranslate"><span class="pre">ioff</span></code> and <code class="docutils literal notranslate"><span class="pre">ion</span></code> can be used as context managers<a class="headerlink" href="#ioff-and-ion-can-be-used-as-context-managers" title="Permalink to this headline">¶</a></h4>
<p><a class="reference internal" href="_as_gen/matplotlib.pyplot.ion.html#matplotlib.pyplot.ion" title="matplotlib.pyplot.ion"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.ion</span></code></a> and <a class="reference internal" href="_as_gen/matplotlib.pyplot.ioff.html#matplotlib.pyplot.ioff" title="matplotlib.pyplot.ioff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.ioff</span></code></a> may now be used as context managers to create
a context with interactive mode on or off, respectively. The old behavior of
calling these functions is maintained. To use the new functionality call as:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">plt</span><span class="o">.</span><span class="n">ioff</span><span class="p">():</span>
<span class="c1"># non-interactive code</span>
</pre></div>
</div>
</div>
<div class="section" id="locators-and-formatters-must-be-in-the-class-hierarchy">
<h4>Locators and formatters must be in the class hierarchy<a class="headerlink" href="#locators-and-formatters-must-be-in-the-class-hierarchy" title="Permalink to this headline">¶</a></h4>
<p>Axis locators and formatters must now be subclasses of
<a class="reference internal" href="ticker_api.html#matplotlib.ticker.Locator" title="matplotlib.ticker.Locator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Locator</span></code></a> and <a class="reference internal" href="ticker_api.html#matplotlib.ticker.Formatter" title="matplotlib.ticker.Formatter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Formatter</span></code></a> respectively.</p>
</div>
<div class="section" id="date-locator-for-daily-interval-now-returns-middle-of-month">
<h4>Date locator for DAILY interval now returns middle of month<a class="headerlink" href="#date-locator-for-daily-interval-now-returns-middle-of-month" title="Permalink to this headline">¶</a></h4>
<p>The <a class="reference internal" href="dates_api.html#matplotlib.dates.AutoDateLocator" title="matplotlib.dates.AutoDateLocator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.dates.AutoDateLocator</span></code></a> has a default of
<code class="docutils literal notranslate"><span class="pre">interval_multiples=True</span></code> that attempts to align ticks with the start of
meaningful intervals like the start of the month, or start of the day, etc.
That lead to approximately 140-day intervals being mapped to the first and 22nd
of the month. This has now been changed so that it chooses the first and 15th
of the month, which is probably what most people want.</p>
</div>
<div class="section" id="scalarformatter-uselocale-option-obeys-grouping">
<h4><code class="docutils literal notranslate"><span class="pre">ScalarFormatter</span></code> <em>useLocale</em> option obeys grouping<a class="headerlink" href="#scalarformatter-uselocale-option-obeys-grouping" title="Permalink to this headline">¶</a></h4>
<p>When the <a class="reference internal" href="ticker_api.html#matplotlib.ticker.ScalarFormatter" title="matplotlib.ticker.ScalarFormatter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ScalarFormatter</span></code></a> option <em>useLocale</em> is enabled (or
<code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=axes.formatter.use_locale#a-sample-matplotlibrc-file"><span class="pre">rcParams["axes.formatter.use_locale"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">False</span></code>) is <em>True</em>) and the configured locale uses
grouping, a separator will be added as described in <a class="reference external" href="https://docs.python.org/3/library/locale.html#locale.format_string" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">locale.format_string</span></code></a>.</p>
</div>
<div class="section" id="axes-errorbar-cycles-non-color-properties-correctly">
<h4><code class="docutils literal notranslate"><span class="pre">Axes.errorbar</span></code> cycles non-color properties correctly<a class="headerlink" href="#axes-errorbar-cycles-non-color-properties-correctly" title="Permalink to this headline">¶</a></h4>
<p>Formerly, <a class="reference internal" href="_as_gen/matplotlib.axes.Axes.errorbar.html#matplotlib.axes.Axes.errorbar" title="matplotlib.axes.Axes.errorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes.errorbar</span></code></a> incorrectly skipped the Axes property cycle if a
color was explicitly specified, even if the property cycler was for other
properties (such as line style). Now, <a class="reference internal" href="_as_gen/matplotlib.axes.Axes.errorbar.html#matplotlib.axes.Axes.errorbar" title="matplotlib.axes.Axes.errorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes.errorbar</span></code></a> will advance the Axes
property cycle as done for <a class="reference internal" href="_as_gen/matplotlib.axes.Axes.plot.html#matplotlib.axes.Axes.plot" title="matplotlib.axes.Axes.plot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes.plot</span></code></a>, i.e., as long as all properties in the
cycler are not explicitly passed.</p>
</div>
<div class="section" id="pyplot-specgram-always-uses-origin-upper">
<h4>pyplot.specgram always uses origin='upper'<a class="headerlink" href="#pyplot-specgram-always-uses-origin-upper" title="Permalink to this headline">¶</a></h4>
<p>Previously if <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=image.origin#a-sample-matplotlibrc-file"><span class="pre">rcParams["image.origin"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">'upper'</span></code>) was set to something other than <code class="docutils literal notranslate"><span class="pre">'upper'</span></code> or
if the <em>origin</em> keyword argument was passed with a value other than
<code class="docutils literal notranslate"><span class="pre">'upper'</span></code>, the spectrogram itself would flip, but the Axes would remain
oriented for an origin value of <code class="docutils literal notranslate"><span class="pre">'upper'</span></code>, so that the resulting plot was
incorrectly labelled.</p>
<p>Now, the <em>origin</em> keyword argument is not supported and the <code class="docutils literal notranslate"><span class="pre">image.origin</span></code>
rcParam is ignored. The function <a class="reference internal" href="_as_gen/matplotlib.pyplot.specgram.html#matplotlib.pyplot.specgram" title="matplotlib.pyplot.specgram"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.pyplot.specgram</span></code></a> is forced to use
<code class="docutils literal notranslate"><span class="pre">origin='upper'</span></code>, so that the Axes are correct for the plotted spectrogram.</p>
</div>
<div class="section" id="xunits-none-and-yunits-none-passed-as-keyword-arguments-are-treated-as-no-action">
<h4>xunits=None and yunits=None passed as keyword arguments are treated as "no action"<a class="headerlink" href="#xunits-none-and-yunits-none-passed-as-keyword-arguments-are-treated-as-no-action" title="Permalink to this headline">¶</a></h4>
<p>Many (but not all) of the methods on <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> take the (undocumented)
keyword arguments <em>xunits</em> and <em>yunits</em> that will update the units on the given
Axis by calling <a class="reference internal" href="_as_gen/matplotlib.axis.Axis.set_units.html#matplotlib.axis.Axis.set_units" title="matplotlib.axis.Axis.set_units"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axis.set_units</span></code></a> and <a class="reference internal" href="_as_gen/matplotlib.axis.Axis.update_units.html#matplotlib.axis.Axis.update_units" title="matplotlib.axis.Axis.update_units"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axis.update_units</span></code></a>.</p>
<p>Previously if <em>None</em> was passed it would clear the value stored in
<code class="docutils literal notranslate"><span class="pre">.Axis.units</span></code> which will in turn break converters which rely on the value in
<code class="docutils literal notranslate"><span class="pre">.Axis.units</span></code> to work properly (notably <a class="reference internal" href="category_api.html#matplotlib.category.StrCategoryConverter" title="matplotlib.category.StrCategoryConverter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">StrCategoryConverter</span></code></a>).</p>
<p>This changes the semantics of <code class="docutils literal notranslate"><span class="pre">ax.meth(...,</span> <span class="pre">xunits=None,</span> <span class="pre">yunits=None)</span></code> from
"please clear the units" to "do the default thing as if they had not been
passed" which is consistent with the standard behavior of Matplotlib keyword
arguments.</p>
<p>If you were relying on passing <code class="docutils literal notranslate"><span class="pre">xunits=None</span></code> to plotting methods to clear the
<code class="docutils literal notranslate"><span class="pre">.Axes.units</span></code> attribute, directly call <a class="reference internal" href="_as_gen/matplotlib.axis.Axis.set_units.html#matplotlib.axis.Axis.set_units" title="matplotlib.axis.Axis.set_units"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axis.set_units</span></code></a> (and
<a class="reference internal" href="_as_gen/matplotlib.axis.Axis.update_units.html#matplotlib.axis.Axis.update_units" title="matplotlib.axis.Axis.update_units"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axis.update_units</span></code></a> if you also require the converter to be updated).</p>
</div>
<div class="section" id="annotations-with-annotation-clip-no-longer-affect-tight-layout">
<h4>Annotations with <code class="docutils literal notranslate"><span class="pre">annotation_clip</span></code> no longer affect <code class="docutils literal notranslate"><span class="pre">tight_layout</span></code><a class="headerlink" href="#annotations-with-annotation-clip-no-longer-affect-tight-layout" title="Permalink to this headline">¶</a></h4>
<p>Previously, <a class="reference internal" href="text_api.html#matplotlib.text.Annotation.get_tightbbox" title="matplotlib.text.Annotation.get_tightbbox"><code class="xref py py-obj docutils literal notranslate"><span class="pre">text.Annotation.get_tightbbox</span></code></a> always returned the full
<a class="reference internal" href="text_api.html#matplotlib.text.Annotation.get_window_extent" title="matplotlib.text.Annotation.get_window_extent"><code class="xref py py-obj docutils literal notranslate"><span class="pre">text.Annotation.get_window_extent</span></code></a> of the object, independent of the value of
<code class="docutils literal notranslate"><span class="pre">annotation_clip</span></code>. <a class="reference internal" href="text_api.html#matplotlib.text.Annotation.get_tightbbox" title="matplotlib.text.Annotation.get_tightbbox"><code class="xref py py-obj docutils literal notranslate"><span class="pre">text.Annotation.get_tightbbox</span></code></a> now correctly takes this
extra clipping box into account, meaning that <a class="reference internal" href="text_api.html#matplotlib.text.Annotation" title="matplotlib.text.Annotation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Annotation</span></code></a>s that are
not drawn because of <code class="docutils literal notranslate"><span class="pre">annotation_clip</span></code> will not count towards the Axes
bounding box calculations, such as those done by <a class="reference internal" href="_as_gen/matplotlib.pyplot.tight_layout.html#matplotlib.pyplot.tight_layout" title="matplotlib.pyplot.tight_layout"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tight_layout</span></code></a>.</p>
<p>This is now consistent with the API described in <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
specifies that <code class="docutils literal notranslate"><span class="pre">get_window_extent</span></code> should return the full extents and
<code class="docutils literal notranslate"><span class="pre">get_tightbbox</span></code> should "account for any clipping".</p>
</div>
<div class="section" id="parasite-axes-pcolor-and-pcolormesh-now-defaults-to-placing-grid-edges-at-integers-not-half-integers">
<h4>Parasite Axes pcolor and pcolormesh now defaults to placing grid edges at integers, not half-integers<a class="headerlink" href="#parasite-axes-pcolor-and-pcolormesh-now-defaults-to-placing-grid-edges-at-integers-not-half-integers" title="Permalink to this headline">¶</a></h4>
<p>This is consistent with <a class="reference internal" href="_as_gen/matplotlib.axes.Axes.pcolor.html#matplotlib.axes.Axes.pcolor" title="matplotlib.axes.Axes.pcolor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pcolor</span></code></a> and <a class="reference internal" href="_as_gen/matplotlib.axes.Axes.pcolormesh.html#matplotlib.axes.Axes.pcolormesh" title="matplotlib.axes.Axes.pcolormesh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pcolormesh</span></code></a>.</p>
</div>
<div class="section" id="colorbar-outline-is-now-a-spine">
<h4><code class="docutils literal notranslate"><span class="pre">Colorbar</span></code> outline is now a <code class="docutils literal notranslate"><span class="pre">Spine</span></code><a class="headerlink" href="#colorbar-outline-is-now-a-spine" title="Permalink to this headline">¶</a></h4>
<p>The outline of <a class="reference internal" href="colorbar_api.html#matplotlib.colorbar.Colorbar" title="matplotlib.colorbar.Colorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Colorbar</span></code></a> is now a <a class="reference internal" href="spines_api.html#matplotlib.spines.Spine" title="matplotlib.spines.Spine"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Spine</span></code></a> and drawn as
one, instead of a <a class="reference internal" href="_as_gen/matplotlib.patches.Polygon.html#matplotlib.patches.Polygon" title="matplotlib.patches.Polygon"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Polygon</span></code></a> drawn as an artist. This ensures it will always be
drawn after (i.e., on top of) all artists, consistent with Spines on normal
Axes.</p>
</div>
<div class="section" id="colorbar-dividers-changes">
<h4><code class="docutils literal notranslate"><span class="pre">Colorbar.dividers</span></code> changes<a class="headerlink" href="#colorbar-dividers-changes" title="Permalink to this headline">¶</a></h4>
<p>This attribute is now always a <a class="reference internal" href="collections_api.html#matplotlib.collections.LineCollection" title="matplotlib.collections.LineCollection"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LineCollection</span></code></a> -- an empty one if
<code class="docutils literal notranslate"><span class="pre">drawedges</span></code> is <em>False</em>. Its default colors and linewidth
(<code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=axes.edgecolor#a-sample-matplotlibrc-file"><span class="pre">rcParams["axes.edgecolor"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">'black'</span></code>), <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=axes.linewidth#a-sample-matplotlibrc-file"><span class="pre">rcParams["axes.linewidth"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">0.8</span></code>)) are now resolved at instantiation
time, not at draw time.</p>
</div>
<div class="section" id="raise-or-warn-on-registering-a-colormap-twice">
<h4>Raise or warn on registering a colormap twice<a class="headerlink" href="#raise-or-warn-on-registering-a-colormap-twice" title="Permalink to this headline">¶</a></h4>
<p>When using <a class="reference internal" href="cm_api.html#matplotlib.cm.register_cmap" title="matplotlib.cm.register_cmap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.cm.register_cmap</span></code></a> to register a user provided or
third-party colormap it will now raise a <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ValueError</span></code></a> if trying to over-write
one of the built in colormaps and warn if trying to over write a user
registered colormap. This may raise for user-registered colormaps in the
future.</p>
</div>
<div class="section" id="consecutive-rasterized-draws-now-merged">
<h4>Consecutive rasterized draws now merged<a class="headerlink" href="#consecutive-rasterized-draws-now-merged" title="Permalink to this headline">¶</a></h4>
<p>Tracking of depth of raster draws has moved from
<a class="reference internal" href="backend_mixed_api.html#matplotlib.backends.backend_mixed.MixedModeRenderer.start_rasterizing" title="matplotlib.backends.backend_mixed.MixedModeRenderer.start_rasterizing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">backend_mixed.MixedModeRenderer.start_rasterizing</span></code></a> and
<a class="reference internal" href="backend_mixed_api.html#matplotlib.backends.backend_mixed.MixedModeRenderer.stop_rasterizing" title="matplotlib.backends.backend_mixed.MixedModeRenderer.stop_rasterizing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">backend_mixed.MixedModeRenderer.stop_rasterizing</span></code></a> into
<a class="reference internal" href="_as_gen/matplotlib.artist.allow_rasterization.html#matplotlib.artist.allow_rasterization" title="matplotlib.artist.allow_rasterization"><code class="xref py py-obj docutils literal notranslate"><span class="pre">artist.allow_rasterization</span></code></a>. This means the start and stop functions are only
called when the rasterization actually needs to be started and stopped.</p>
<p>The output of vector backends will change in the case that rasterized elements
are merged. This should not change the appearance of outputs.</p>
<p>The renders in 3rd party backends are now expected to have
<code class="docutils literal notranslate"><span class="pre">self._raster_depth</span></code> and <code class="docutils literal notranslate"><span class="pre">self._rasterizing</span></code> initialized to <code class="docutils literal notranslate"><span class="pre">0</span></code> and
<em>False</em> respectively.</p>
</div>
<div class="section" id="consistent-behavior-of-draw-if-interactive-across-backends">
<h4>Consistent behavior of <code class="docutils literal notranslate"><span class="pre">draw_if_interactive()</span></code> across backends<a class="headerlink" href="#consistent-behavior-of-draw-if-interactive-across-backends" title="Permalink to this headline">¶</a></h4>
<p><a class="reference internal" href="_as_gen/matplotlib.pyplot.draw_if_interactive.html#matplotlib.pyplot.draw_if_interactive" title="matplotlib.pyplot.draw_if_interactive"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.draw_if_interactive</span></code></a> no longer shows the window (if it was previously
unshown) on the Tk and nbAgg backends, consistently with all other backends.</p>
</div>
<div class="section" id="the-artist-property-rasterized-cannot-be-none-anymore">
<h4>The Artist property <em>rasterized</em> cannot be <em>None</em> anymore<a class="headerlink" href="#the-artist-property-rasterized-cannot-be-none-anymore" title="Permalink to this headline">¶</a></h4>
<p>It is now a boolean only. Before the default was <em>None</em> and
<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-obj docutils literal notranslate"><span class="pre">Artist.set_rasterized</span></code></a> was documented to accept <em>None</em>. However, <em>None</em> did
not have a special meaning and was treated as <em>False</em>.</p>
</div>
<div class="section" id="canvas-s-callback-registry-now-stored-on-figure">
<h4>Canvas's callback registry now stored on Figure<a class="headerlink" href="#canvas-s-callback-registry-now-stored-on-figure" title="Permalink to this headline">¶</a></h4>
<p>The canonical location of the <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> used to handle
Figure/Canvas events has been moved from the Canvas to the Figure. This change
should be transparent to almost all users, however if you are swapping
switching the Figure out from on top of a Canvas or visa versa you may see a
change in behavior.</p>
</div>
<div class="section" id="harmonized-key-event-data-across-backends">
<h4>Harmonized key event data across backends<a class="headerlink" href="#harmonized-key-event-data-across-backends" title="Permalink to this headline">¶</a></h4>
<p>The different backends with key translation support, now handle "Shift" as a
sometimes modifier, where the <code class="docutils literal notranslate"><span class="pre">'shift+'</span></code> prefix won't be added if a key
translation was made.</p>
<p>In the Qt5 backend, the <code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_qt5.SPECIAL_KEYS</span></code>
dictionary contains keys that do <em>not</em> return their unicode name instead they
have manually specified names. The name for <code class="docutils literal notranslate"><span class="pre">QtCore.Qt.Key_Meta</span></code> has changed
to <code class="docutils literal notranslate"><span class="pre">'meta'</span></code> to be consistent with the other GUI backends.</p>
<p>The WebAgg backend now handles key translations correctly on non-US keyboard
layouts.</p>
<p>In the GTK and Tk backends, the handling of non-ASCII keypresses (as reported
in the KeyEvent passed to <code class="docutils literal notranslate"><span class="pre">key_press_event</span></code>-handlers) now correctly reports
Unicode characters (e.g., €), and better respects NumLock on the numpad.</p>
<p>In the GTK and Tk backends, the following key names have changed; the new names
are consistent with those reported by the Qt backends:</p>
<ul class="simple">
<li>The "Break/Pause" key (keysym 0xff13) is now reported as <code class="docutils literal notranslate"><span class="pre">"pause"</span></code> instead
of <code class="docutils literal notranslate"><span class="pre">"break"</span></code> (this is also consistent with the X key name).</li>
<li>The numpad "delete" key is now reported as <code class="docutils literal notranslate"><span class="pre">"delete"</span></code> instead of <code class="docutils literal notranslate"><span class="pre">"dec"</span></code>.</li>
</ul>
</div>
<div class="section" id="webagg-backend-no-longer-reports-a-middle-click-as-a-right-click">
<h4>WebAgg backend no longer reports a middle click as a right click<a class="headerlink" href="#webagg-backend-no-longer-reports-a-middle-click-as-a-right-click" title="Permalink to this headline">¶</a></h4>
<p>Previously when using the WebAgg backend the event passed to a callback by
<code class="docutils literal notranslate"><span class="pre">fig.canvas.mpl_connect('mouse_button_event',</span> <span class="pre">callback)</span></code> on a middle click
would report <a class="reference internal" href="backend_bases_api.html#matplotlib.backend_bases.MouseButton.RIGHT" title="matplotlib.backend_bases.MouseButton.RIGHT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MouseButton.RIGHT</span></code></a> instead of <a class="reference internal" href="backend_bases_api.html#matplotlib.backend_bases.MouseButton.MIDDLE" title="matplotlib.backend_bases.MouseButton.MIDDLE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MouseButton.MIDDLE</span></code></a>.</p>
</div>
<div class="section" id="id-attribute-of-xml-tags-in-svg-files-now-based-on-sha256-rather-than-md5">
<h4>ID attribute of XML tags in SVG files now based on SHA256 rather than MD5<a class="headerlink" href="#id-attribute-of-xml-tags-in-svg-files-now-based-on-sha256-rather-than-md5" title="Permalink to this headline">¶</a></h4>
<p>Matplotlib generates unique ID attributes for various tags in SVG files.
Matplotlib previously generated these unique IDs using the first 10 characters
of an MD5 hash. The MD5 hashing algorithm is not available in Python on systems
with Federal Information Processing Standards (FIPS) enabled. Matplotlib now
uses the first 10 characters of an SHA256 hash instead. SVG files that would
otherwise match those saved with earlier versions of matplotlib, will have
different ID attributes.</p>
</div>
<div class="section" id="rendererps-set-font-is-no-longer-a-no-op-in-afm-mode">
<h4><code class="docutils literal notranslate"><span class="pre">RendererPS.set_font</span></code> is no longer a no-op in AFM mode<a class="headerlink" href="#rendererps-set-font-is-no-longer-a-no-op-in-afm-mode" title="Permalink to this headline">¶</a></h4>
<p><a class="reference internal" href="backend_ps_api.html#matplotlib.backends.backend_ps.RendererPS.set_font" title="matplotlib.backends.backend_ps.RendererPS.set_font"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RendererPS.set_font</span></code></a> now sets the current PostScript font in all cases.</p>
</div>
<div class="section" id="autoscaling-in-axes3d">
<h4>Autoscaling in Axes3D<a class="headerlink" href="#autoscaling-in-axes3d" title="Permalink to this headline">¶</a></h4>
<p>In Matplotlib 3.2.0, autoscaling was made lazier for 2D Axes, i.e., limits
would only be recomputed when actually rendering the canvas, or when the user
queries the Axes limits. This performance improvement is now extended to
<a class="reference internal" href="_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D" title="mpl_toolkits.mplot3d.axes3d.Axes3D"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes3D</span></code></a>. This also fixes some issues with autoscaling being triggered
unexpectedly in Axes3D.</p>
<p>Please see <a class="reference internal" href="prev_api_changes/api_changes_3.2.0.html#api-changes-3-2-0-autoscaling"><span class="std std-ref">the API change for 2D Axes</span></a>
for further details.</p>
</div>
<div class="section" id="axes3d-automatically-adding-itself-to-figure-is-deprecated">
<h4>Axes3D automatically adding itself to Figure is deprecated<a class="headerlink" href="#axes3d-automatically-adding-itself-to-figure-is-deprecated" title="Permalink to this headline">¶</a></h4>
<p>New <a class="reference internal" href="_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D" title="mpl_toolkits.mplot3d.axes3d.Axes3D"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes3D</span></code></a> objects previously added themselves to figures when they were
created, unlike all other Axes classes, which lead to them being added twice if
<code class="docutils literal notranslate"><span class="pre">fig.add_subplot(111,</span> <span class="pre">projection='3d')</span></code> was called.</p>
<p>This behavior is now deprecated and will warn. The new keyword argument
<em>auto_add_to_figure</em> controls the behavior and can be used to suppress the
warning. The default value will change to <em>False</em> in Matplotlib 3.5, and any
non-<em>False</em> value will be an error in Matplotlib 3.6.</p>
<p>In the future, <a class="reference internal" href="_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D" title="mpl_toolkits.mplot3d.axes3d.Axes3D"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes3D</span></code></a> will need to be explicitly added to the figure</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fig</span> <span class="o">=</span> <span class="n">Figure</span><span class="p">()</span>
<span class="c1"># create Axes3D</span>
<span class="n">ax</span> <span class="o">=</span> <span class="n">Axes3d</span><span class="p">(</span><span class="n">fig</span><span class="p">)</span>
<span class="c1"># add to Figure</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>
<p>as needs to be done for other <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> sub-classes. Or, a 3D projection can
be made via:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fig</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="n">projection</span><span class="o">=</span><span class="s1">'3d'</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="mplot3d-art3d-get-dir-vector-always-returns-numpy-arrays">
<h4><code class="docutils literal notranslate"><span class="pre">mplot3d.art3d.get_dir_vector</span></code> always returns NumPy arrays<a class="headerlink" href="#mplot3d-art3d-get-dir-vector-always-returns-numpy-arrays" title="Permalink to this headline">¶</a></h4>
<p>For consistency, <a class="reference internal" href="_as_gen/mpl_toolkits.mplot3d.art3d.get_dir_vector.html#mpl_toolkits.mplot3d.art3d.get_dir_vector" title="mpl_toolkits.mplot3d.art3d.get_dir_vector"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_dir_vector</span></code></a> now always returns NumPy
arrays, even if the input is a 3-element iterable.</p>
</div>
<div class="section" id="changed-cursive-and-fantasy-font-definitions">
<h4>Changed cursive and fantasy font definitions<a class="headerlink" href="#changed-cursive-and-fantasy-font-definitions" title="Permalink to this headline">¶</a></h4>
<p>The Comic Sans and Comic Neue fonts were moved from the default
<code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=font.fantasy#a-sample-matplotlibrc-file"><span class="pre">rcParams["font.fantasy"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">['Chicago',</span> <span class="pre">'Charcoal',</span> <span class="pre">'Impact',</span> <span class="pre">'Western',</span> <span class="pre">'Humor</span> <span class="pre">Sans',</span> <span class="pre">'xkcd',</span> <span class="pre">'fantasy']</span></code>) list to the default <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=font.cursive#a-sample-matplotlibrc-file"><span class="pre">rcParams["font.cursive"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">['Apple</span> <span class="pre">Chancery',</span> <span class="pre">'Textile',</span> <span class="pre">'Zapf</span> <span class="pre">Chancery',</span> <span class="pre">'Sand',</span> <span class="pre">'Script</span> <span class="pre">MT',</span> <span class="pre">'Felipa',</span> <span class="pre">'Comic</span> <span class="pre">Neue',</span> <span class="pre">'Comic</span> <span class="pre">Sans</span> <span class="pre">MS',</span> <span class="pre">'cursive']</span></code>) setting, in
accordance with the CSS font families <a class="reference external" href="https://www.w3.org/Style/Examples/007/fonts.en.html">example</a> and in order to provide a
cursive font present in Microsoft's Core Fonts set.</p>
</div>
<div class="section" id="docstring-substitution-now-always-dedents-docstrings-before-string-interpolation">
<h4>docstring.Substitution now always dedents docstrings before string interpolation<a class="headerlink" href="#docstring-substitution-now-always-dedents-docstrings-before-string-interpolation" title="Permalink to this headline">¶</a></h4>
</div>
</div>
<div class="section" id="deprecations">
<h3><a class="toc-backref" href="#id4">Deprecations</a><a class="headerlink" href="#deprecations" title="Permalink to this headline">¶</a></h3>
<div class="section" id="extra-parameters-to-axes-constructor">
<h4>Extra parameters to Axes constructor<a class="headerlink" href="#extra-parameters-to-axes-constructor" title="Permalink to this headline">¶</a></h4>
<p>Parameters of the Axes constructor other than <em>fig</em> and <em>rect</em> will become
keyword-only in a future version.</p>
</div>
<div class="section" id="pyplot-gca-and-figure-gca-keyword-arguments">
<h4><code class="docutils literal notranslate"><span class="pre">pyplot.gca</span></code> and <code class="docutils literal notranslate"><span class="pre">Figure.gca</span></code> keyword arguments<a class="headerlink" href="#pyplot-gca-and-figure-gca-keyword-arguments" title="Permalink to this headline">¶</a></h4>
<p>Passing keyword arguments to <a class="reference internal" href="_as_gen/matplotlib.pyplot.gca.html#matplotlib.pyplot.gca" title="matplotlib.pyplot.gca"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.gca</span></code></a> or <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure.gca" title="matplotlib.figure.Figure.gca"><code class="xref py py-obj docutils literal notranslate"><span class="pre">figure.Figure.gca</span></code></a> will not be
supported in a future release.</p>
</div>
<div class="section" id="axis-cla-radialaxis-cla-thetaaxis-cla-and-spine-cla">
<h4><code class="docutils literal notranslate"><span class="pre">Axis.cla</span></code>, <code class="docutils literal notranslate"><span class="pre">RadialAxis.cla</span></code>, <code class="docutils literal notranslate"><span class="pre">ThetaAxis.cla</span></code> and <code class="docutils literal notranslate"><span class="pre">Spine.cla</span></code><a class="headerlink" href="#axis-cla-radialaxis-cla-thetaaxis-cla-and-spine-cla" title="Permalink to this headline">¶</a></h4>
<p>These methods are deprecated in favor of the respective <code class="docutils literal notranslate"><span class="pre">clear()</span></code> methods.</p>
</div>
<div class="section" id="invalid-hatch-pattern-characters-are-no-longer-ignored">
<h4>Invalid hatch pattern characters are no longer ignored<a class="headerlink" href="#invalid-hatch-pattern-characters-are-no-longer-ignored" title="Permalink to this headline">¶</a></h4>
<p>When specifying hatching patterns, characters that are not recognized will
raise a deprecation warning. In the future, this will become a hard error.</p>
</div>
<div class="section" id="imread-reading-from-urls">
<h4><code class="docutils literal notranslate"><span class="pre">imread</span></code> reading from URLs<a class="headerlink" href="#imread-reading-from-urls" title="Permalink to this headline">¶</a></h4>
<p>Passing a URL to <a class="reference internal" href="_as_gen/matplotlib.pyplot.imread.html#matplotlib.pyplot.imread" title="matplotlib.pyplot.imread"><code class="xref py py-obj docutils literal notranslate"><span class="pre">imread()</span></code></a> is deprecated. Please open the URL for
reading and directly use the Pillow API
(<code class="docutils literal notranslate"><span class="pre">PIL.Image.open(urllib.request.urlopen(url))</span></code>, or
<code class="docutils literal notranslate"><span class="pre">PIL.Image.open(io.BytesIO(requests.get(url).content))</span></code>) instead.</p>
</div>
<div class="section" id="subplot-related-attributes-and-methods">
<h4>Subplot-related attributes and methods<a class="headerlink" href="#subplot-related-attributes-and-methods" title="Permalink to this headline">¶</a></h4>
<p>Some <code class="docutils literal notranslate"><span class="pre">SubplotBase</span></code> methods and attributes have been deprecated and/or moved
to <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>:</p>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">get_geometry</span></code> (use <a class="reference internal" href="_as_gen/matplotlib.axes.SubplotBase.html#matplotlib.axes.SubplotBase.get_subplotspec" title="matplotlib.axes.SubplotBase.get_subplotspec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotBase.get_subplotspec</span></code></a> instead),</li>
<li><code class="docutils literal notranslate"><span class="pre">change_geometry</span></code> (use <a class="reference internal" href="_as_gen/matplotlib.axes.SubplotBase.html#matplotlib.axes.SubplotBase.set_subplotspec" title="matplotlib.axes.SubplotBase.set_subplotspec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotBase.set_subplotspec</span></code></a> instead),</li>
<li><code class="docutils literal notranslate"><span class="pre">is_first_row</span></code>, <code class="docutils literal notranslate"><span class="pre">is_last_row</span></code>, <code class="docutils literal notranslate"><span class="pre">is_first_col</span></code>, <code class="docutils literal notranslate"><span class="pre">is_last_col</span></code> (use the
corresponding methods on the <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> instance instead),</li>
<li><code class="docutils literal notranslate"><span class="pre">update_params</span></code> (now a no-op),</li>
<li><code class="docutils literal notranslate"><span class="pre">figbox</span></code> (use <code class="docutils literal notranslate"><span class="pre">ax.get_subplotspec().get_geometry(ax.figure)</span></code> instead to
recompute the geometry, or <code class="docutils literal notranslate"><span class="pre">ax.get_position()</span></code> to read its current value),</li>
<li><code class="docutils literal notranslate"><span class="pre">numRows</span></code>, <code class="docutils literal notranslate"><span class="pre">numCols</span></code> (use the <code class="docutils literal notranslate"><span class="pre">nrows</span></code> and <code class="docutils literal notranslate"><span class="pre">ncols</span></code> attribute on the
<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> instead).</li>
</ul>
<p>Likewise, the <code class="docutils literal notranslate"><span class="pre">get_geometry</span></code>, <code class="docutils literal notranslate"><span class="pre">change_geometry</span></code>, <code class="docutils literal notranslate"><span class="pre">update_params</span></code>, and
<code class="docutils literal notranslate"><span class="pre">figbox</span></code> methods/attributes of <a class="reference internal" href="_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider.html#mpl_toolkits.axes_grid1.axes_divider.SubplotDivider" title="mpl_toolkits.axes_grid1.axes_divider.SubplotDivider"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SubplotDivider</span></code></a> have been deprecated, with
similar replacements.</p>
</div>
<div class="section" id="is-url-and-url-regex">
<h4><code class="docutils literal notranslate"><span class="pre">is_url</span></code> and <code class="docutils literal notranslate"><span class="pre">URL_REGEX</span></code><a class="headerlink" href="#is-url-and-url-regex" title="Permalink to this headline">¶</a></h4>
<p>... are deprecated. (They were previously defined in the toplevel
<a class="reference internal" href="../index.html#module-matplotlib" title="matplotlib"><code class="xref py py-mod docutils literal notranslate"><span class="pre">matplotlib</span></code></a> module.)</p>
</div>
<div class="section" id="matplotlib-style-core-deprecations">
<h4><code class="docutils literal notranslate"><span class="pre">matplotlib.style.core</span></code> deprecations<a class="headerlink" href="#matplotlib-style-core-deprecations" title="Permalink to this headline">¶</a></h4>
<p><code class="docutils literal notranslate"><span class="pre">STYLE_FILE_PATTERN</span></code>, <code class="docutils literal notranslate"><span class="pre">load_base_library</span></code>, and <code class="docutils literal notranslate"><span class="pre">iter_user_libraries</span></code> are
deprecated.</p>
</div>
<div class="section" id="tick-apply-tickdir-is-deprecated">
<h4><code class="docutils literal notranslate"><span class="pre">Tick.apply_tickdir</span></code> is deprecated<a class="headerlink" href="#tick-apply-tickdir-is-deprecated" title="Permalink to this headline">¶</a></h4>
<p><code class="docutils literal notranslate"><span class="pre">apply_tickdir</span></code> didn't actually update the tick markers on the existing
Line2D objects used to draw the ticks; use <a class="reference internal" href="_as_gen/matplotlib.axis.Axis.set_tick_params.html#matplotlib.axis.Axis.set_tick_params" title="matplotlib.axis.Axis.set_tick_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axis.set_tick_params</span></code></a> instead.</p>
</div>
<div class="section" id="dpi-cor-property-of-fancyarrowpatch">
<h4><code class="docutils literal notranslate"><span class="pre">dpi_cor</span></code> property of <a class="reference internal" href="_as_gen/matplotlib.patches.FancyArrowPatch.html#matplotlib.patches.FancyArrowPatch" title="matplotlib.patches.FancyArrowPatch"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FancyArrowPatch</span></code></a><a class="headerlink" href="#dpi-cor-property-of-fancyarrowpatch" title="Permalink to this headline">¶</a></h4>
<p>This parameter is considered internal and deprecated.</p>
</div>
<div class="section" id="passing-boxstyle-custom-bbox-transmuter-to-fancybboxpatch">
<h4>Passing <code class="docutils literal notranslate"><span class="pre">boxstyle="custom",</span> <span class="pre">bbox_transmuter=...</span></code> to <code class="docutils literal notranslate"><span class="pre">FancyBboxPatch</span></code><a class="headerlink" href="#passing-boxstyle-custom-bbox-transmuter-to-fancybboxpatch" title="Permalink to this headline">¶</a></h4>
<p>In order to use a custom boxstyle, directly pass it as the <em>boxstyle</em> argument
to <a class="reference internal" href="_as_gen/matplotlib.patches.FancyBboxPatch.html#matplotlib.patches.FancyBboxPatch" title="matplotlib.patches.FancyBboxPatch"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FancyBboxPatch</span></code></a>. This was previously already possible, and is consistent
with custom arrow styles and connection styles.</p>
</div>
<div class="section" id="boxstyles-are-now-called-without-passing-the-mutation-aspect-parameter">
<h4>BoxStyles are now called without passing the <em>mutation_aspect</em> parameter<a class="headerlink" href="#boxstyles-are-now-called-without-passing-the-mutation-aspect-parameter" title="Permalink to this headline">¶</a></h4>
<p>Mutation aspect is now handled by the artist itself. Hence the
<em>mutation_aspect</em> parameter of <code class="docutils literal notranslate"><span class="pre">BoxStyle._Base.__call__</span></code> is deprecated, and
custom boxstyles should be implemented to not require this parameter (it can be
left as a parameter defaulting to 1 for back-compatibility).</p>
</div>
<div class="section" id="contourlabeler-get-label-coords-is-deprecated">
<h4><code class="docutils literal notranslate"><span class="pre">ContourLabeler.get_label_coords</span></code> is deprecated<a class="headerlink" href="#contourlabeler-get-label-coords-is-deprecated" title="Permalink to this headline">¶</a></h4>
<p>It is considered an internal helper.</p>
</div>
<div class="section" id="line2d-and-patch-no-longer-duplicate-validjoin-and-validcap">
<h4>Line2D and Patch no longer duplicate <code class="docutils literal notranslate"><span class="pre">validJoin</span></code> and <code class="docutils literal notranslate"><span class="pre">validCap</span></code><a class="headerlink" href="#line2d-and-patch-no-longer-duplicate-validjoin-and-validcap" title="Permalink to this headline">¶</a></h4>
<p>Validation of joinstyle and capstyles is now centralized in <code class="docutils literal notranslate"><span class="pre">rcsetup</span></code>.</p>
</div>
<div class="section" id="setting-a-line2d-s-pickradius-via-set-picker-is-undeprecated">
<h4>Setting a Line2D's pickradius via <code class="docutils literal notranslate"><span class="pre">set_picker</span></code> is undeprecated<a class="headerlink" href="#setting-a-line2d-s-pickradius-via-set-picker-is-undeprecated" title="Permalink to this headline">¶</a></h4>
<p>This cancels the deprecation introduced in Matplotlib 3.3.0.</p>
</div>
<div class="section" id="markerstyle-is-considered-immutable">
<h4><code class="docutils literal notranslate"><span class="pre">MarkerStyle</span></code> is considered immutable<a class="headerlink" href="#markerstyle-is-considered-immutable" title="Permalink to this headline">¶</a></h4>
<p><code class="docutils literal notranslate"><span class="pre">MarkerStyle.set_fillstyle()</span></code> and <code class="docutils literal notranslate"><span class="pre">MarkerStyle.set_marker()</span></code> are
deprecated. Create a new <code class="docutils literal notranslate"><span class="pre">MarkerStyle</span></code> with the respective parameters
instead.</p>
</div>
<div class="section" id="moviewriter-cleanup-is-deprecated">
<h4><code class="docutils literal notranslate"><span class="pre">MovieWriter.cleanup</span></code> is deprecated<a class="headerlink" href="#moviewriter-cleanup-is-deprecated" title="Permalink to this headline">¶</a></h4>
<p>Cleanup logic is now fully implemented in <a class="reference internal" href="_as_gen/matplotlib.animation.MovieWriter.html#matplotlib.animation.MovieWriter.finish" title="matplotlib.animation.MovieWriter.finish"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MovieWriter.finish</span></code></a>. Third-party
movie writers should likewise move the relevant cleanup logic there, as
overridden <code class="docutils literal notranslate"><span class="pre">cleanup</span></code>s will no longer be called in the future.</p>
</div>
<div class="section" id="minimumdescent-parameter-property-of-textarea">
<h4><em>minimumdescent</em> parameter/property of <code class="docutils literal notranslate"><span class="pre">TextArea</span></code><a class="headerlink" href="#minimumdescent-parameter-property-of-textarea" title="Permalink to this headline">¶</a></h4>
<p><a class="reference internal" href="offsetbox_api.html#matplotlib.offsetbox.TextArea" title="matplotlib.offsetbox.TextArea"><code class="xref py py-obj docutils literal notranslate"><span class="pre">offsetbox.TextArea</span></code></a> has behaved as if <em>minimumdescent</em> was always True
(regardless of the value to which it was set) since Matplotlib 1.3, so the
parameter/property is deprecated.</p>
</div>
<div class="section" id="colorbar-now-warns-when-the-mappable-s-axes-is-different-from-the-current-axes">
<h4><code class="docutils literal notranslate"><span class="pre">colorbar</span></code> now warns when the mappable's Axes is different from the current Axes<a class="headerlink" href="#colorbar-now-warns-when-the-mappable-s-axes-is-different-from-the-current-axes" title="Permalink to this headline">¶</a></h4>
<p>Currently, <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure.colorbar" title="matplotlib.figure.Figure.colorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.colorbar</span></code></a> and <a class="reference internal" href="_as_gen/matplotlib.pyplot.colorbar.html#matplotlib.pyplot.colorbar" title="matplotlib.pyplot.colorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.colorbar</span></code></a> steal space by default
from the current Axes to place the colorbar. In a future version, they will
steal space from the mappable's Axes instead. In preparation for this change,
<a class="reference internal" href="figure_api.html#matplotlib.figure.Figure.colorbar" title="matplotlib.figure.Figure.colorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure.colorbar</span></code></a> and <a class="reference internal" href="_as_gen/matplotlib.pyplot.colorbar.html#matplotlib.pyplot.colorbar" title="matplotlib.pyplot.colorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyplot.colorbar</span></code></a> now emits a warning when the current
Axes is not the same as the mappable's Axes.</p>
</div>
<div class="section" id="colorbar-docstrings">
<h4>Colorbar docstrings<a class="headerlink" href="#colorbar-docstrings" title="Permalink to this headline">¶</a></h4>
<p>The following globals in <a class="reference internal" href="colorbar_api.html#module-matplotlib.colorbar" title="matplotlib.colorbar"><code class="xref py py-mod docutils literal notranslate"><span class="pre">matplotlib.colorbar</span></code></a> are deprecated:
<code class="docutils literal notranslate"><span class="pre">colorbar_doc</span></code>, <code class="docutils literal notranslate"><span class="pre">colormap_kw_doc</span></code>, <code class="docutils literal notranslate"><span class="pre">make_axes_kw_doc</span></code>.</p>
</div>
<div class="section" id="colorbarpatch-and-colorbar-factory-are-deprecated">
<h4><code class="docutils literal notranslate"><span class="pre">ColorbarPatch</span></code> and <code class="docutils literal notranslate"><span class="pre">colorbar_factory</span></code> are deprecated<a class="headerlink" href="#colorbarpatch-and-colorbar-factory-are-deprecated" title="Permalink to this headline">¶</a></h4>
<p>All the relevant functionality has been moved to the
<a class="reference internal" href="colorbar_api.html#matplotlib.colorbar.Colorbar" title="matplotlib.colorbar.Colorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Colorbar</span></code></a> class.</p>
</div>
<div class="section" id="backend-deprecations">
<h4>Backend deprecations<a class="headerlink" href="#backend-deprecations" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">FigureCanvasBase.get_window_title</span></code> and
<code class="docutils literal notranslate"><span class="pre">FigureCanvasBase.set_window_title</span></code> are deprecated. Use the corresponding
methods on the FigureManager if using pyplot, or GUI-specific methods if
embedding.</li>
<li>The <em>resize_callback</em> parameter to <code class="docutils literal notranslate"><span class="pre">FigureCanvasTk</span></code> was never used
internally and is deprecated. Tk-level custom event handlers for resize
events can be added to a <code class="docutils literal notranslate"><span class="pre">FigureCanvasTk</span></code> using e.g.
<code class="docutils literal notranslate"><span class="pre">get_tk_widget().bind('<Configure>',</span> <span class="pre">...,</span> <span class="pre">True)</span></code>.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">key_press</span></code> and <code class="docutils literal notranslate"><span class="pre">button_press</span></code> methods of <a class="reference internal" href="backend_bases_api.html#matplotlib.backend_bases.FigureManagerBase" title="matplotlib.backend_bases.FigureManagerBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManagerBase</span></code></a>, which
incorrectly did nothing when using <code class="docutils literal notranslate"><span class="pre">toolmanager</span></code>, are deprecated in favor
of directly passing the event to the <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> via
<code class="docutils literal notranslate"><span class="pre">self.canvas.callbacks.process(event.name,</span> <span class="pre">event)</span></code>.</li>
<li><code class="docutils literal notranslate"><span class="pre">RendererAgg.get_content_extents</span></code> and
<code class="docutils literal notranslate"><span class="pre">RendererAgg.tostring_rgba_minimized</span></code> are deprecated.</li>
<li><code class="docutils literal notranslate"><span class="pre">backend_pgf.TmpDirCleaner</span></code> is deprecated, with no replacement.</li>
<li><code class="docutils literal notranslate"><span class="pre">GraphicsContextPS</span></code> is deprecated. The PostScript backend now uses
<a class="reference internal" href="backend_bases_api.html#matplotlib.backend_bases.GraphicsContextBase" title="matplotlib.backend_bases.GraphicsContextBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GraphicsContextBase</span></code></a>.</li>
</ul>
</div>
<div class="section" id="wx-backend-cleanups">
<h4>wx backend cleanups<a class="headerlink" href="#wx-backend-cleanups" title="Permalink to this headline">¶</a></h4>
<p>The <em>origin</em> parameter to <code class="docutils literal notranslate"><span class="pre">_FigureCanvasWxBase.gui_repaint</span></code> is deprecated
with no replacement; <code class="docutils literal notranslate"><span class="pre">gui_repaint</span></code> now automatically detects the case where
it is used with the wx renderer.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">NavigationToolbar2Wx.get_canvas</span></code> method is deprecated; directly
instantiate a canvas (<code class="docutils literal notranslate"><span class="pre">FigureCanvasWxAgg(frame,</span> <span class="pre">-1,</span> <span class="pre">figure)</span></code>) if needed.</p>
</div>
<div class="section" id="unused-positional-parameters-to-print-fmt-methods-are-deprecated">
<h4>Unused positional parameters to <code class="docutils literal notranslate"><span class="pre">print_<fmt></span></code> methods are deprecated<a class="headerlink" href="#unused-positional-parameters-to-print-fmt-methods-are-deprecated" title="Permalink to this headline">¶</a></h4>
<p>None of the <code class="docutils literal notranslate"><span class="pre">print_<fmt></span></code> methods implemented by canvas subclasses used
positional arguments other that the first (the output filename or file-like),
so these extra parameters are deprecated.</p>
</div>
<div class="section" id="the-dpi-parameter-of-figurecanvas-print-foo-printers-is-deprecated">
<h4>The <em>dpi</em> parameter of <code class="docutils literal notranslate"><span class="pre">FigureCanvas.print_foo</span></code> printers is deprecated<a class="headerlink" href="#the-dpi-parameter-of-figurecanvas-print-foo-printers-is-deprecated" title="Permalink to this headline">¶</a></h4>
<p>The <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure.savefig" title="matplotlib.figure.Figure.savefig"><code class="xref py py-obj docutils literal notranslate"><span class="pre">savefig</span></code></a> machinery already took care of setting the figure DPI
to the desired value, so <code class="docutils literal notranslate"><span class="pre">print_foo</span></code> can directly read it from there. Not
passing <em>dpi</em> to <code class="docutils literal notranslate"><span class="pre">print_foo</span></code> allows clearer detection of unused parameters
passed to <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure.savefig" title="matplotlib.figure.Figure.savefig"><code class="xref py py-obj docutils literal notranslate"><span class="pre">savefig</span></code></a>.</p>
</div>
<div class="section" id="passing-bytes-to-ft2font-set-text">
<h4>Passing <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytes" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bytes</span></code></a> to <code class="docutils literal notranslate"><span class="pre">FT2Font.set_text</span></code><a class="headerlink" href="#passing-bytes-to-ft2font-set-text" title="Permalink to this headline">¶</a></h4>
<p>... is deprecated, pass <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">str</span></code></a> instead.</p>
</div>
<div class="section" id="ps-useafm-deprecated-for-mathtext">
<h4><code class="docutils literal notranslate"><span class="pre">ps.useafm</span></code> deprecated for mathtext<a class="headerlink" href="#ps-useafm-deprecated-for-mathtext" title="Permalink to this headline">¶</a></h4>
<p>Outputting mathtext using only standard PostScript fonts has likely been broken
for a while (issue <a class="reference external" href="https://github.com/matplotlib/matplotlib/issues/18722">#18722</a>). In Matplotlib 3.5,
the setting <code class="docutils literal notranslate"><a class="reference external" href="../tutorials/introductory/customizing.html?highlight=ps.useafm#a-sample-matplotlibrc-file"><span class="pre">rcParams["ps.useafm"]</span></a></code> (default: <code class="docutils literal notranslate"><span class="pre">False</span></code>) will have no effect on mathtext.</p>
</div>
<div class="section" id="mathtextparser-bitmap-is-deprecated">
<h4><code class="docutils literal notranslate"><span class="pre">MathTextParser("bitmap")</span></code> is deprecated<a class="headerlink" href="#mathtextparser-bitmap-is-deprecated" title="Permalink to this headline">¶</a></h4>
<p>The associated APIs <code class="docutils literal notranslate"><span class="pre">MathtextBackendBitmap</span></code>, <code class="docutils literal notranslate"><span class="pre">MathTextParser.to_mask</span></code>,
<code class="docutils literal notranslate"><span class="pre">MathTextParser.to_rgba</span></code>, <code class="docutils literal notranslate"><span class="pre">MathTextParser.to_png</span></code>, and
<code class="docutils literal notranslate"><span class="pre">MathTextParser.get_depth</span></code> are likewise deprecated.</p>
<p>To convert a text string to an image, either directly draw the text to an
empty <a class="reference internal" href="figure_api.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Figure</span></code></a> and save the figure using a tight bbox, as demonstrated in
<a class="reference internal" href="../gallery/text_labels_and_annotations/mathtext_asarray.html"><span class="doc">Convert texts to images</span></a>, or use
<a class="reference internal" href="mathtext_api.html#matplotlib.mathtext.math_to_image" title="matplotlib.mathtext.math_to_image"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mathtext.math_to_image</span></code></a>.</p>
<p>When using <a class="reference internal" href="mathtext_api.html#matplotlib.mathtext.math_to_image" title="matplotlib.mathtext.math_to_image"><code class="xref py py-obj docutils literal notranslate"><span class="pre">math_to_image</span></code></a>, text color can be set with e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">plt</span><span class="o">.</span><span class="n">rc_context</span><span class="p">({</span><span class="s2">"text.color"</span><span class="p">:</span> <span class="s2">"tab:blue"</span><span class="p">}):</span>
<span class="n">mathtext</span><span class="o">.</span><span class="n">math_to_image</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
</pre></div>
</div>
<p>and an RGBA array can be obtained with e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">io</span> <span class="kn">import</span> <span class="n">BytesIO</span>
<span class="n">buf</span> <span class="o">=</span> <span class="n">BytesIO</span><span class="p">()</span>
<span class="n">mathtext</span><span class="o">.</span><span class="n">math_to_image</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">buf</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="s2">"png"</span><span class="p">)</span>
<span class="n">buf</span><span class="o">.</span><span class="n">seek</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="n">rgba</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">imread</span><span class="p">(</span><span class="n">buf</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="deprecation-of-mathtext-internals">
<h4>Deprecation of mathtext internals<a class="headerlink" href="#deprecation-of-mathtext-internals" title="Permalink to this headline">¶</a></h4>
<p>The following API elements previously exposed by the <a class="reference internal" href="mathtext_api.html#module-matplotlib.mathtext" title="matplotlib.mathtext"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mathtext</span></code></a> module
are considered to be implementation details and public access to them is
deprecated:</p>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">Fonts</span></code> and all its subclasses,</li>
<li><code class="docutils literal notranslate"><span class="pre">FontConstantsBase</span></code> and all its subclasses,</li>
<li><code class="docutils literal notranslate"><span class="pre">Node</span></code> and all its subclasses,</li>
<li><code class="docutils literal notranslate"><span class="pre">Ship</span></code>, <code class="docutils literal notranslate"><span class="pre">ship</span></code>,</li>
<li><code class="docutils literal notranslate"><span class="pre">Error</span></code>,</li>
<li><code class="docutils literal notranslate"><span class="pre">Parser</span></code>,</li>
<li><code class="docutils literal notranslate"><span class="pre">SHRINK_FACTOR</span></code>, <code class="docutils literal notranslate"><span class="pre">GROW_FACTOR</span></code>,</li>
<li><code class="docutils literal notranslate"><span class="pre">NUM_SIZE_LEVELS</span></code>,</li>
<li><code class="docutils literal notranslate"><span class="pre">latex_to_bakoma</span></code>, <code class="docutils literal notranslate"><span class="pre">latex_to_cmex</span></code>, <code class="docutils literal notranslate"><span class="pre">latex_to_standard</span></code>,</li>
<li><code class="docutils literal notranslate"><span class="pre">stix_virtual_fonts</span></code>,</li>
<li><code class="docutils literal notranslate"><span class="pre">tex2uni</span></code>.</li>
</ul>
</div>
<div class="section" id="deprecation-of-various-mathtext-helpers">
<h4>Deprecation of various mathtext helpers<a class="headerlink" href="#deprecation-of-various-mathtext-helpers" title="Permalink to this headline">¶</a></h4>
<p>The <code class="docutils literal notranslate"><span class="pre">MathtextBackendPdf</span></code>, <code class="docutils literal notranslate"><span class="pre">MathtextBackendPs</span></code>, <code class="docutils literal notranslate"><span class="pre">MathtextBackendSvg</span></code>,
and <code class="docutils literal notranslate"><span class="pre">MathtextBackendCairo</span></code> classes from the <a class="reference internal" href="mathtext_api.html#module-matplotlib.mathtext" title="matplotlib.mathtext"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mathtext</span></code></a> module, as
well as the corresponding <code class="docutils literal notranslate"><span class="pre">.mathtext_parser</span></code> attributes on <code class="docutils literal notranslate"><span class="pre">RendererPdf</span></code>,
<code class="docutils literal notranslate"><span class="pre">RendererPS</span></code>, <code class="docutils literal notranslate"><span class="pre">RendererSVG</span></code>, and <code class="docutils literal notranslate"><span class="pre">RendererCairo</span></code>, are deprecated. The
<code class="docutils literal notranslate"><span class="pre">MathtextBackendPath</span></code> class can be used to obtain a list of glyphs and
rectangles in a mathtext expression, and renderer-specific logic should be
directly implemented in the renderer.</p>
<p><code class="docutils literal notranslate"><span class="pre">StandardPsFonts.pswriter</span></code> is unused and deprecated.</p>
</div>
<div class="section" id="widget-class-internals">
<h4>Widget class internals<a class="headerlink" href="#widget-class-internals" title="Permalink to this headline">¶</a></h4>
<p>Several <a class="reference internal" href="widgets_api.html#matplotlib.widgets.Widget" title="matplotlib.widgets.Widget"><code class="xref py py-obj docutils literal notranslate"><span class="pre">widgets.Widget</span></code></a> class internals have been privatized and deprecated:</p>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">AxesWidget.cids</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">Button.cnt</span></code> and <code class="docutils literal notranslate"><span class="pre">Button.observers</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">CheckButtons.cnt</span></code> and <code class="docutils literal notranslate"><span class="pre">CheckButtons.observers</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">RadioButtons.cnt</span></code> and <code class="docutils literal notranslate"><span class="pre">RadioButtons.observers</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">Slider.cnt</span></code> and <code class="docutils literal notranslate"><span class="pre">Slider.observers</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">TextBox.cnt</span></code>, <code class="docutils literal notranslate"><span class="pre">TextBox.change_observers</span></code> and
<code class="docutils literal notranslate"><span class="pre">TextBox.submit_observers</span></code></li>
</ul>
</div>
<div class="section" id="d-properties-on-renderers">
<h4>3D properties on renderers<a class="headerlink" href="#d-properties-on-renderers" title="Permalink to this headline">¶</a></h4>
<p>The properties of the 3D Axes that were placed on the Renderer during draw are
now deprecated:</p>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">renderer.M</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">renderer.eye</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">renderer.vvec</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">renderer.get_axis_position</span></code></li>
</ul>
<p>These attributes are all available via <a class="reference internal" href="_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D" title="mpl_toolkits.mplot3d.axes3d.Axes3D"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axes3D</span></code></a>, which can be accessed via
<code class="docutils literal notranslate"><span class="pre">self.axes</span></code> on all <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.</p>
</div>
<div class="section" id="renderer-argument-of-do-3d-projection-method-for-collection3d-patch3d">
<h4><em>renderer</em> argument of <code class="docutils literal notranslate"><span class="pre">do_3d_projection</span></code> method for <code class="docutils literal notranslate"><span class="pre">Collection3D</span></code>/<code class="docutils literal notranslate"><span class="pre">Patch3D</span></code><a class="headerlink" href="#renderer-argument-of-do-3d-projection-method-for-collection3d-patch3d" title="Permalink to this headline">¶</a></h4>
<p>The <em>renderer</em> argument for the <code class="docutils literal notranslate"><span class="pre">do_3d_projection</span></code> method on <code class="docutils literal notranslate"><span class="pre">Collection3D</span></code>
and <code class="docutils literal notranslate"><span class="pre">Patch3D</span></code> is no longer necessary, and passing it during draw is
deprecated.</p>
</div>
<div class="section" id="project-argument-of-draw-method-for-line3dcollection">
<h4><em>project</em> argument of <code class="docutils literal notranslate"><span class="pre">draw</span></code> method for <code class="docutils literal notranslate"><span class="pre">Line3DCollection</span></code><a class="headerlink" href="#project-argument-of-draw-method-for-line3dcollection" title="Permalink to this headline">¶</a></h4>
<p>The <em>project</em> argument for the <code class="docutils literal notranslate"><span class="pre">draw</span></code> method on <code class="docutils literal notranslate"><span class="pre">Line3DCollection</span></code> is
deprecated. Call <a class="reference internal" href="_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection.html#mpl_toolkits.mplot3d.art3d.Line3DCollection.do_3d_projection" title="mpl_toolkits.mplot3d.art3d.Line3DCollection.do_3d_projection"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Line3DCollection.do_3d_projection</span></code></a> explicitly instead.</p>
</div>
<div class="section" id="extra-positional-parameters-to-plot-surface-and-plot-wireframe">
<h4>Extra positional parameters to <code class="docutils literal notranslate"><span class="pre">plot_surface</span></code> and <code class="docutils literal notranslate"><span class="pre">plot_wireframe</span></code><a class="headerlink" href="#extra-positional-parameters-to-plot-surface-and-plot-wireframe" title="Permalink to this headline">¶</a></h4>
<p>Positional parameters to <a class="reference internal" href="_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface" title="mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_surface</span></code></a> and
<a class="reference internal" href="_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe" title="mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_wireframe</span></code></a> other than <code class="docutils literal notranslate"><span class="pre">X</span></code>, <code class="docutils literal notranslate"><span class="pre">Y</span></code>, and <code class="docutils literal notranslate"><span class="pre">Z</span></code> are
deprecated. Pass additional artist properties as keyword arguments instead.</p>
</div>
<div class="section" id="parasiteaxesauxtransbase-class">
<h4><code class="docutils literal notranslate"><span class="pre">ParasiteAxesAuxTransBase</span></code> class<a class="headerlink" href="#parasiteaxesauxtransbase-class" title="Permalink to this headline">¶</a></h4>
<p>The functionality of that mixin class has been moved to the base
<code class="docutils literal notranslate"><span class="pre">ParasiteAxesBase</span></code> class. Thus, <code class="docutils literal notranslate"><span class="pre">ParasiteAxesAuxTransBase</span></code>,
<code class="docutils literal notranslate"><span class="pre">ParasiteAxesAuxTrans</span></code>, and <code class="docutils literal notranslate"><span class="pre">parasite_axes_auxtrans_class_factory</span></code> are
deprecated.</p>
<p>In general, it is suggested to use <code class="docutils literal notranslate"><span class="pre">HostAxes.get_aux_axes</span></code> to create
parasite Axes, as this saves the need of manually appending the parasite
to <code class="docutils literal notranslate"><span class="pre">host.parasites</span></code> and makes sure that their <code class="docutils literal notranslate"><span class="pre">remove()</span></code> method works
properly.</p>
</div>
<div class="section" id="axisartist-zorder-attribute">
<h4><code class="docutils literal notranslate"><span class="pre">AxisArtist.ZORDER</span></code> attribute<a class="headerlink" href="#axisartist-zorder-attribute" title="Permalink to this headline">¶</a></h4>
<p>Use <code class="docutils literal notranslate"><span class="pre">AxisArtist.zorder</span></code> instead.</p>
</div>
<div class="section" id="gridhelperbase-invalidation">
<h4><code class="docutils literal notranslate"><span class="pre">GridHelperBase</span></code> invalidation<a class="headerlink" href="#gridhelperbase-invalidation" title="Permalink to this headline">¶</a></h4>
<p>The <code class="docutils literal notranslate"><span class="pre">GridHelperBase.invalidate</span></code>, <code class="docutils literal notranslate"><span class="pre">GridHelperBase.valid</span></code>, and
<code class="docutils literal notranslate"><span class="pre">axislines.Axes.invalidate_grid_helper</span></code> methods are considered internal
and deprecated.</p>
</div>
<div class="section" id="sphinext-plot-directive-align">
<h4><code class="docutils literal notranslate"><span class="pre">sphinext.plot_directive.align</span></code><a class="headerlink" href="#sphinext-plot-directive-align" title="Permalink to this headline">¶</a></h4>
<p>... is deprecated. Use <code class="docutils literal notranslate"><span class="pre">docutils.parsers.rst.directives.images.Image.align</span></code>
instead.</p>
</div>
<div class="section" id="deprecation-related-functionality-is-considered-internal">
<h4>Deprecation-related functionality is considered internal<a class="headerlink" href="#deprecation-related-functionality-is-considered-internal" title="Permalink to this headline">¶</a></h4>
<p>The module <code class="docutils literal notranslate"><span class="pre">matplotlib.cbook.deprecation</span></code> is considered internal and will be
removed from the public API. This also holds for deprecation-related re-imports
in <code class="docutils literal notranslate"><span class="pre">matplotlib.cbook</span></code>, i.e. <code class="docutils literal notranslate"><span class="pre">matplotlib.cbook.deprecated()</span></code>,
<code class="docutils literal notranslate"><span class="pre">matplotlib.cbook.warn_deprecated()</span></code>,
<code class="docutils literal notranslate"><span class="pre">matplotlib.cbook.MatplotlibDeprecationWarning</span></code> and
<code class="docutils literal notranslate"><span class="pre">matplotlib.cbook.mplDeprecation</span></code>.</p>
<p>If needed, external users may import <code class="docutils literal notranslate"><span class="pre">MatplotlibDeprecationWarning</span></code> directly
from the <code class="docutils literal notranslate"><span class="pre">matplotlib</span></code> namespace. <code class="docutils literal notranslate"><span class="pre">mplDeprecation</span></code> is only an alias of
<code class="docutils literal notranslate"><span class="pre">MatplotlibDeprecationWarning</span></code> and should not be used anymore.</p>
</div>
</div>
<div class="section" id="removals">
<h3><a class="toc-backref" href="#id5">Removals</a><a class="headerlink" href="#removals" title="Permalink to this headline">¶</a></h3>
<p>The following deprecated APIs have been removed:</p>
<div class="section" id="removed-behaviour">
<h4>Removed behaviour<a class="headerlink" href="#removed-behaviour" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li>The "smart bounds" functionality on <a class="reference internal" href="axis_api.html#matplotlib.axis.Axis" title="matplotlib.axis.Axis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Axis</span></code></a> and <a class="reference internal" href="spines_api.html#matplotlib.spines.Spine" title="matplotlib.spines.Spine"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Spine</span></code></a> has been
deleted, and the related methods have been removed.</li>
<li>Converting a string with single color characters (e.g. <code class="docutils literal notranslate"><span class="pre">'cymk'</span></code>) in
<a class="reference internal" href="_as_gen/matplotlib.colors.to_rgba_array.html#matplotlib.colors.to_rgba_array" title="matplotlib.colors.to_rgba_array"><code class="xref py py-obj docutils literal notranslate"><span class="pre">to_rgba_array</span></code></a> is no longer supported. Instead, the colors can be
passed individually in a list (e.g. <code class="docutils literal notranslate"><span class="pre">['c',</span> <span class="pre">'y',</span> <span class="pre">'m',</span> <span class="pre">'k']</span></code>).</li>
<li>Returning a factor equal to <code class="docutils literal notranslate"><span class="pre">None</span></code> from <code class="docutils literal notranslate"><span class="pre">mpl_toolkits.axisartist</span></code>
Locators (which are <strong>not</strong> the same as "standard" tick Locators), or passing
a factor equal to <code class="docutils literal notranslate"><span class="pre">None</span></code> to axisartist Formatters (which are <strong>not</strong> the
same as "standard" tick Formatters) is no longer supported. Pass a factor
equal to 1 instead.</li>
</ul>
</div>
<div class="section" id="modules">
<h4>Modules<a class="headerlink" href="#modules" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li>The entire <code class="docutils literal notranslate"><span class="pre">matplotlib.testing.disable_internet</span></code> module has been removed.
The <a class="reference external" href="https://github.com/astropy/pytest-remotedata">pytest-remotedata package</a> can be used instead.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">mpl_toolkits.axes_grid1.colorbar</span></code> module and its colorbar
implementation have been removed in favor of <a class="reference internal" href="colorbar_api.html#module-matplotlib.colorbar" title="matplotlib.colorbar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">matplotlib.colorbar</span></code></a>.</li>
</ul>
</div>
<div class="section" id="classes-methods-and-attributes">
<h4>Classes, methods and attributes<a class="headerlink" href="#classes-methods-and-attributes" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li>The <a class="reference internal" href="_as_gen/matplotlib.animation.MovieWriterRegistry.html#matplotlib.animation.MovieWriterRegistry" title="matplotlib.animation.MovieWriterRegistry"><code class="xref py py-obj docutils literal notranslate"><span class="pre">animation.MovieWriterRegistry</span></code></a> methods <code class="docutils literal notranslate"><span class="pre">.set_dirty()</span></code>,
<code class="docutils literal notranslate"><span class="pre">.ensure_not_dirty()</span></code>, and <code class="docutils literal notranslate"><span class="pre">.reset_available_writers()</span></code> do nothing and
have been removed. The <code class="docutils literal notranslate"><span class="pre">.avail()</span></code> method has been removed; use <code class="docutils literal notranslate"><span class="pre">.list()</span></code>
instead to get a list of available writers.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">matplotlib.artist.Artist.eventson</span></code> and
<code class="docutils literal notranslate"><span class="pre">matplotlib.container.Container.eventson</span></code> attributes have no effect and
have been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.axes.Axes.get_data_ratio_log</span></code> has been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.axes.SubplotBase.rowNum</span></code>; use
<code class="docutils literal notranslate"><span class="pre">ax.get_subplotspec().rowspan.start</span></code> instead.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.axes.SubplotBase.colNum</span></code>; use
<code class="docutils literal notranslate"><span class="pre">ax.get_subplotspec().colspan.start</span></code> instead.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.axis.Axis.set_smart_bounds</span></code> and
<code class="docutils literal notranslate"><span class="pre">matplotlib.axis.Axis.get_smart_bounds</span></code> have been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.colors.DivergingNorm</span></code> has been renamed to
<a class="reference internal" href="_as_gen/matplotlib.colors.TwoSlopeNorm.html#matplotlib.colors.TwoSlopeNorm" title="matplotlib.colors.TwoSlopeNorm"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TwoSlopeNorm</span></code></a>.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.figure.AxesStack</span></code> has been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.font_manager.JSONEncoder</span></code> has been removed; use
<a class="reference internal" href="font_manager_api.html#matplotlib.font_manager.json_dump" title="matplotlib.font_manager.json_dump"><code class="xref py py-obj docutils literal notranslate"><span class="pre">font_manager.json_dump</span></code></a> to dump a <a class="reference internal" href="font_manager_api.html#matplotlib.font_manager.FontManager" title="matplotlib.font_manager.FontManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FontManager</span></code></a> instance.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">matplotlib.ft2font.FT2Image</span></code> methods <code class="docutils literal notranslate"><span class="pre">.as_array()</span></code>,
<code class="docutils literal notranslate"><span class="pre">.as_rgba_str()</span></code>, <code class="docutils literal notranslate"><span class="pre">.as_str()</span></code>, <code class="docutils literal notranslate"><span class="pre">.get_height()</span></code> and <code class="docutils literal notranslate"><span class="pre">.get_width()</span></code>
have been removed. Convert the <code class="docutils literal notranslate"><span class="pre">FT2Image</span></code> to a NumPy array with
<code class="docutils literal notranslate"><span class="pre">np.asarray</span></code> before processing it.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.quiver.QuiverKey.quiverkey_doc</span></code> has been removed; use
<code class="docutils literal notranslate"><span class="pre">matplotlib.quiver.QuiverKey.__init__.__doc__</span></code> instead.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.spines.Spine.set_smart_bounds</span></code> and
<code class="docutils literal notranslate"><span class="pre">matplotlib.spines.Spine.get_smart_bounds</span></code> have been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.testing.jpl_units.UnitDbl.checkUnits</span></code> has been removed; use
<code class="docutils literal notranslate"><span class="pre">units</span> <span class="pre">not</span> <span class="pre">in</span> <span class="pre">self.allowed</span></code> instead.</li>
<li>The unused <code class="docutils literal notranslate"><span class="pre">matplotlib.ticker.Locator.autoscale</span></code> method has been removed
(pass the axis limits to <a class="reference internal" href="ticker_api.html#matplotlib.ticker.Locator.view_limits" title="matplotlib.ticker.Locator.view_limits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Locator.view_limits</span></code></a> instead). The derived methods
<code class="docutils literal notranslate"><span class="pre">Locator.autoscale</span></code>, <code class="docutils literal notranslate"><span class="pre">AutoDateLocator.autoscale</span></code>,
<code class="docutils literal notranslate"><span class="pre">RRuleLocator.autoscale</span></code>, <code class="docutils literal notranslate"><span class="pre">RadialLocator.autoscale</span></code>,
<code class="docutils literal notranslate"><span class="pre">ThetaLocator.autoscale</span></code>, and <code class="docutils literal notranslate"><span class="pre">YearLocator.autoscale</span></code> have also been
removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.transforms.BboxBase.is_unit</span></code> has been removed; check the
<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> extents if needed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.transforms.Affine2DBase.matrix_from_values(...)</span></code> has been
removed; use (for example) <code class="docutils literal notranslate"><span class="pre">Affine2D.from_values(...).get_matrix()</span></code>
instead.</li>
</ul>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.backend_bases.FigureCanvasBase.draw_cursor</span></code> has been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.destroy</span></code> and
<code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.init_window</span></code> methods
have been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.window</span></code> property has
been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_macosx.FigureCanvasMac.invalidate</span></code> has been
removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_pgf.RendererPgf.latexManager</span></code> has been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_wx.FigureFrameWx.statusbar</span></code>,
<code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_wx.NavigationToolbar2Wx.set_status_bar</span></code>, and
<code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_wx.NavigationToolbar2Wx.statbar</span></code> have been
removed. The status bar can be retrieved by calling standard wx methods
(<code class="docutils literal notranslate"><span class="pre">frame.GetStatusBar()</span></code> and
<code class="docutils literal notranslate"><span class="pre">toolbar.GetTopLevelParent().GetStatusBar()</span></code>).</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_wx.ConfigureSubplotsWx.configure_subplots</span></code> and
<code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_wx.ConfigureSubplotsWx.get_canvas</span></code> have been
removed.</li>
</ul>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">mpl_toolkits.axisartist.grid_finder.GridFinderBase</span></code> has been removed; use
<a class="reference internal" href="_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinder.html#mpl_toolkits.axisartist.grid_finder.GridFinder" title="mpl_toolkits.axisartist.grid_finder.GridFinder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GridFinder</span></code></a> instead.</li>
<li><code class="docutils literal notranslate"><span class="pre">mpl_toolkits.axisartist.axis_artist.BezierPath</span></code> has been removed; use
<a class="reference internal" href="_as_gen/matplotlib.patches.PathPatch.html#matplotlib.patches.PathPatch" title="matplotlib.patches.PathPatch"><code class="xref py py-obj docutils literal notranslate"><span class="pre">patches.PathPatch</span></code></a> instead.</li>
</ul>
</div>
<div class="section" id="functions">
<h4>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_pgf.repl_escapetext</span></code> and
<code class="docutils literal notranslate"><span class="pre">matplotlib.backends.backend_pgf.repl_mathdefault</span></code> have been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.checkdep_ps_distiller</span></code> has been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.cm.revcmap</span></code> has been removed; use <a class="reference internal" href="_as_gen/matplotlib.colors.Colormap.html#matplotlib.colors.Colormap.reversed" title="matplotlib.colors.Colormap.reversed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Colormap.reversed</span></code></a>
instead.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.colors.makeMappingArray</span></code> has been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.compare_versions</span></code> has been removed; use comparison of
<code class="docutils literal notranslate"><span class="pre">distutils.version.LooseVersion</span></code>s instead.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.dates.mx2num</span></code> has been removed.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.font_manager.createFontList</span></code> has been removed;
<a class="reference internal" href="font_manager_api.html#matplotlib.font_manager.FontManager.addfont" title="matplotlib.font_manager.FontManager.addfont"><code class="xref py py-obj docutils literal notranslate"><span class="pre">font_manager.FontManager.addfont</span></code></a> is now available to register a font at a
given path.</li>
<li><code class="docutils literal notranslate"><span class="pre">matplotlib.get_home</span></code> has been removed; use standard library instead.</li>