@@ -26,12 +26,14 @@ This pages lists API changes for the most recent version of Matplotlib.
26
26
- All the files in 'next_api_changes' should be moved to the bottom of this page
27
27
- This note, and the toctree below should be commented out
28
28
29
+ ..
29
30
30
- .. toctree ::
31
- :glob:
32
- :maxdepth: 1
31
+ .. toctree ::
32
+ :glob:
33
+ :maxdepth: 1
34
+
35
+ next_api_changes/*
33
36
34
- next_api_changes/*
35
37
36
38
API Changes for 3.0.0
37
39
=====================
@@ -68,7 +70,7 @@ string to ``"None"``, so subsequent calls to `Text.get_text` would return
68
70
the ambiguous ``"None" `` string.
69
71
70
72
This change sets text objects passed ``None `` to have empty strings, so that
71
- `Text.get_text ` returns and an empty string.
73
+ `Text.get_text ` returns an empty string.
72
74
73
75
Deprecations
74
76
------------
@@ -130,6 +132,7 @@ The following keyword arguments are deprecated:
130
132
The following call signatures are deprecated:
131
133
- passing a ``wx.EvtHandler `` as first argument to ``backend_wx.TimerWx ``
132
134
135
+
133
136
Deprecated methods removed from `matplotlib.testing `
134
137
----------------------------------------------------
135
138
@@ -250,10 +253,10 @@ The following API elements have been removed:
250
253
i.e., it behaves case-insensitively on Windows only.
251
254
252
255
253
- ``bar ``/ ``barh `` no longer accepts ``left ``/ ``bottom `` as first named argument
254
- ------------------------------------------------------------------------------
256
+ ``bar `` / ``barh `` no longer accepts ``left `` / ``bottom `` as first named argument
257
+ ----------------------------------------------------------------------------------
255
258
256
- These arguments were renamed in 2.0 to ``x ``/ ``y `` following the change of the
259
+ These arguments were renamed in 2.0 to ``x `` / ``y `` following the change of the
257
260
default alignment from ``edge `` to ``center ``.
258
261
259
262
@@ -485,3 +488,148 @@ actually be the default color of whatever was rendering the pgf file (which was
485
488
of course usually black). The new behavior is that black text is black,
486
489
regardless of the default color. However, this means that there is no way to
487
490
fall back on the default color of the renderer.
491
+
492
+
493
+ Blacklisted rcparams no longer updated by `rcdefaults `, `rc_file_defaults `, `rc_file `
494
+ -------------------------------------------------------------------------------------
495
+
496
+ The rc modifier functions `rcdefaults `, `rc_file_defaults ` and `rc_file `
497
+ now ignore rcParams in the `matplotlib.style.core.STYLE_BLACKLIST ` set. In
498
+ particular, this prevents the ``backend `` and ``interactive `` rcParams from
499
+ being incorrectly modified by these functions.
500
+
501
+
502
+ Deprecation of ``LocatableAxes `` in toolkits
503
+ --------------------------------------------
504
+
505
+ The ``LocatableAxes `` classes in toolkits have been deprecated. The base `Axes `
506
+ classes provide the same functionality to all subclasses, thus these mixins are
507
+ no longer necessary. Related functions have also been deprecated. Specifically:
508
+
509
+ * ``mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase ``: no specific
510
+ replacement; use any other ``Axes ``-derived class directly instead.
511
+ * ``mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory ``: no specific
512
+ replacement; use any other ``Axes ``-derived class directly instead.
513
+ * ``mpl_toolkits.axes_grid1.axes_divider.Axes ``: use
514
+ `mpl_toolkits.axes_grid1.mpl_axes.Axes ` directly.
515
+ * ``mpl_toolkits.axes_grid1.axes_divider.LocatableAxes ``: use
516
+ `mpl_toolkits.axes_grid1.mpl_axes.Axes ` directly.
517
+ * ``mpl_toolkits.axisartist.axes_divider.Axes ``: use
518
+ `mpl_toolkits.axisartist.axislines.Axes ` directly.
519
+ * ``mpl_toolkits.axisartist.axes_divider.LocatableAxes ``: use
520
+ `mpl_toolkits.axisartist.axislines.Axes ` directly.
521
+
522
+
523
+ Deprecations
524
+ ------------
525
+ The following modules are deprecated:
526
+
527
+ - :mod: `matplotlib.compat.subprocess `. This was a python 2 workaround, but all
528
+ the functionality can now be found in the python 3 standard library
529
+ :mod: `subprocess `.
530
+ - :mod: `matplotlib.backends.wx_compat `. Python 3 is only compatible with
531
+ wxPython 4, so support for wxPython 3 or earlier can be dropped.
532
+
533
+ The following classes, methods, functions, and attributes are deprecated:
534
+
535
+ - ``RcParams.msg_depr ``, ``RcParams.msg_depr_ignore ``,
536
+ ``RcParams.msg_depr_set ``, ``RcParams.msg_obsolete ``,
537
+ ``RcParams.msg_backend_obsolete ``,
538
+ - ``afm.parse_afm ``,
539
+ - ``backend_pdf.PdfFile.texFontMap ``,
540
+ - ``backend_pgf.get_texcommand ``,
541
+ - ``backend_ps.get_bbox ``,
542
+ - ``backend_qt5.FigureCanvasQT.keyAutoRepeat `` (directly check
543
+ ``event.guiEvent.isAutoRepeat() `` in the event handler to decide whether to
544
+ handle autorepeated key presses).
545
+ - ``backend_qt5.error_msg_qt ``, ``backend_qt5.exception_handler ``,
546
+ - ``backend_wx.FigureCanvasWx.macros ``,
547
+ - ``backends.pylab_setup ``,
548
+ - ``cbook.GetRealpathAndStat ``, ``cbook.Locked ``,
549
+ - ``cbook.is_numlike `` (use ``isinstance(..., numbers.Number) `` instead),
550
+ ``cbook.listFiles ``, ``cbook.unicode_safe ``,
551
+ - ``container.Container.set_remove_method ``,
552
+ - ``contour.ContourLabeler.cl ``, ``.cl_xy ``, and ``.cl_cvalues ``,
553
+ - ``dates.DateFormatter.strftime_pre_1900 ``, ``dates.DateFormatter.strftime ``,
554
+ - ``font_manager.TempCache ``,
555
+ - ``image._ImageBase.iterpnames ``, use the ``interpolation_names `` property
556
+ instead. (this affects classes that inherit from ``_ImageBase `` including
557
+ :class: `FigureImage `, :class: `BboxImage `, and :class: `AxesImage `),
558
+ - ``mathtext.unichr_safe `` (use ``chr `` instead),
559
+ - ``patches.Polygon.xy ``,
560
+ - ``table.Table.get_child_artists `` (use ``get_children `` instead),
561
+ - ``testing.compare.ImageComparisonTest ``, ``testing.compare.compare_float ``,
562
+ - ``testing.decorators.CleanupTest ``,
563
+ ``testing.decorators.skip_if_command_unavailable ``,
564
+ - ``FigureCanvasQT.keyAutoRepeat `` (directly check
565
+ ``event.guiEvent.isAutoRepeat() `` in the event handler to decide whether to
566
+ handle autorepeated key presses).
567
+ - ``texmanager.dvipng_hack_alpha ``,
568
+ - ``text.Annotation.arrow ``,
569
+ - ``textpath.TextToPath.tex_font_map ``,
570
+
571
+ The following rcParams are deprecated:
572
+
573
+ - ``examples.directory `` (use ``datapath `` instead),
574
+ - ``pgf.debug `` (the pgf backend relies on logging),
575
+ - ``text.latex.unicode ``,
576
+
577
+ The following keyword arguments are deprecated:
578
+
579
+ - passing ``verts `` to ``Axes.scatter `` (use ``marker `` instead),
580
+ - passing ``obj_type `` to ``cbook.deprecated ``,
581
+
582
+ The following call signatures are deprecated:
583
+
584
+ - passing a ``wx.EvtHandler `` as first argument to ``backend_wx.TimerWx ``,
585
+
586
+
587
+ `.matplotlib.Axes.get_tightbbox ` now includes all artists
588
+ ---------------------------------------------------------
589
+
590
+ Layout tools like `.Figure.tight_layout `, ``constrained_layout ``,
591
+ and ``fig.savefig('fname.png', bbox_inches="tight") `` use
592
+ `.matplotlib.Axes.get_tightbbox ` to determine the bounds of each axes on
593
+ a figure and adjust spacing between axes.
594
+
595
+ In Matplotlib 2.2 ``get_tightbbox `` started to include legends made on the
596
+ axes, but still excluded some other artists, like text that may overspill an
597
+ axes. For Matplotlib 3.0, *all * artists are now included in the bounding box.
598
+
599
+ This new default may be overridden in either of two ways:
600
+
601
+ 1. Make the artist to be excluded a child of the figure, not the axes. E.g.,
602
+ call ``fig.legend() `` instead of ``ax.legend() `` (perhaps using
603
+ `~.matplotlib.Axes.get_legend_handles_labels ` to gather handles and labels
604
+ from the parent axes).
605
+ 2. If the artist is a child of the axes, set the artist property
606
+ ``artist.set_in_layout(False) ``.
607
+
608
+
609
+ `CallbackRegistry ` now stores callbacks using stdlib's `WeakMethod `\s
610
+ ---------------------------------------------------------------------
611
+
612
+ In particular, this implies that ``CallbackRegistry.callbacks[signal] `` is now
613
+ a mapping of callback ids to `WeakMethod `\s (i.e., they need to be first called
614
+ with no arguments to retrieve the method itself).
615
+
616
+
617
+ Changes regarding the text.latex.unicode rcParam
618
+ ------------------------------------------------
619
+
620
+ The rcParam now defaults to True and is deprecated (i.e., in future versions
621
+ of Maplotlib, unicode input will always be supported).
622
+
623
+ Moreover, the underlying implementation now uses ``\usepackage[utf8]{inputenc} ``
624
+ instead of ``\usepackage{ucs}\usepackage[utf8x]{inputenc} ``.
625
+
626
+
627
+ Removed ``pytz `` as a dependency
628
+ --------------------------------
629
+
630
+ Since ``dateutil `` and ``pytz `` both provide time zones, and
631
+ matplotlib already depends on ``dateutil ``, matplotlib will now use
632
+ ``dateutil `` time zones internally and drop the redundant dependency
633
+ on ``pytz ``. While ``dateutil `` time zones are preferred (and
634
+ currently recommended in the Python documentation), the explicit use
635
+ of ``pytz `` zones is still supported.
0 commit comments