|
| 1 | +``matplotlib.cm.get_cmap`` |
| 2 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 3 | + |
| 4 | +Colormaps are now available through the `.ColormapRegistry` accessible via |
| 5 | +`matplotlib.colormaps` or `matplotlib.pyplot.colormaps`. |
| 6 | + |
| 7 | +If you have the name of a colormap as a string, you can use a direct lookup, |
| 8 | +``matplotlib.colormaps[name]`` or ``matplotlib.pyplot.colormaps[name]``. Alternatively, |
| 9 | +``matplotlib.colormaps.get_cmap`` will maintain the existing behavior of additionally |
| 10 | +passing through `.Colormap` instances and converting ``None`` to the default colormap. |
| 11 | +`matplotlib.pyplot.get_cmap` will stay as a shortcut to |
| 12 | +``matplotlib.colormaps.get_cmap``. |
| 13 | + |
| 14 | +``boxplot`` tick labels |
| 15 | +^^^^^^^^^^^^^^^^^^^^^^^ |
| 16 | + |
| 17 | +The parameter *labels* has been removed in favour of *tick_labels* for clarity and |
| 18 | +consistency with `~.Axes.bar`. |
| 19 | + |
| 20 | +``plot_date`` |
| 21 | +~~~~~~~~~~~~~ |
| 22 | + |
| 23 | +Use of ``plot_date`` has been discouraged since Matplotlib 3.5 and deprecated since 3.9. |
| 24 | +The ``plot_date`` function has now been removed. |
| 25 | + |
| 26 | +- ``datetime``-like data should directly be plotted using `~.Axes.plot`. |
| 27 | +- If you need to plot plain numeric data as :ref:`date-format` or need to set a |
| 28 | + timezone, call ``ax.xaxis.axis_date`` / ``ax.yaxis.axis_date`` before `~.Axes.plot`. |
| 29 | + See `.Axis.axis_date`. |
| 30 | + |
| 31 | +``GridHelperCurveLinear.get_tick_iterator`` |
| 32 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 33 | + |
| 34 | +... is removed with no replacement. |
| 35 | + |
| 36 | +*nth_coord* parameter to axisartist helpers for fixed axis |
| 37 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 38 | + |
| 39 | +Helper APIs in `.axisartist` for generating a "fixed" axis on rectilinear axes |
| 40 | +(`.FixedAxisArtistHelperRectilinear`) no longer take a *nth_coord* parameter. |
| 41 | +That parameter is entirely inferred from the (required) *loc* parameter. |
| 42 | + |
| 43 | +For curvilinear axes, the *nth_coord* parameter remains supported (it affects |
| 44 | +the *ticks*, not the axis position itself), but it is now keyword-only. |
| 45 | + |
| 46 | +``rcsetup.interactive_bk``, ``rcsetup.non_interactive_bk`` and ``rcsetup.all_backends`` |
| 47 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 48 | + |
| 49 | +... are removed and replaced by ``matplotlib.backends.backend_registry.list_builtin`` |
| 50 | +with the following arguments |
| 51 | + |
| 52 | +- ``matplotlib.backends.BackendFilter.INTERACTIVE`` |
| 53 | +- ``matplotlib.backends.BackendFilter.NON_INTERACTIVE`` |
| 54 | +- ``None`` |
| 55 | + |
| 56 | +*interval* parameter of ``TimerBase.start`` |
| 57 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 58 | + |
| 59 | +The timer interval parameter can no longer be set while starting it. The interval can be |
| 60 | +specified instead in the timer constructor, or by setting the timer.interval attribute. |
| 61 | + |
| 62 | +``TransformNode.is_bbox`` |
| 63 | +~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 64 | + |
| 65 | +... is removed. Instead check the object using ``isinstance(..., BboxBase)``. |
| 66 | + |
| 67 | +``BboxTransformToMaxOnly`` |
| 68 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 69 | + |
| 70 | +... is removed. It can be replaced by ``BboxTransformTo(LockableBbox(bbox, x0=0, y0=0))``. |
| 71 | + |
| 72 | +Image path semantics of toolmanager-based tools |
| 73 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 74 | + |
| 75 | +Previously, MEP22 ("toolmanager-based") Tools would try to load their icon |
| 76 | +(``tool.image``) relative to the current working directory, or, as a fallback, from |
| 77 | +Matplotlib's own image directory. Because both approaches are problematic for |
| 78 | +third-party tools (the end-user may change the current working directory at any time, |
| 79 | +and third-parties cannot add new icons in Matplotlib's image directory), this behavior |
| 80 | +has been removed; instead, ``tool.image`` is now interpreted relative to the directory |
| 81 | +containing the source file where the ``Tool.image`` class attribute is defined. |
| 82 | +(Defining ``tool.image`` as an absolute path also works and is compatible with both the |
| 83 | +old and the new semantics.) |
0 commit comments