|
| 1 | +Parameters to ``plt.figure()`` and the ``Figure`` constructor |
| 2 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 3 | + |
| 4 | +All parameters to `.pyplot.figure` and the `.Figure` constructor, other than |
| 5 | +*num*, *figsize*, and *dpi*, are now keyword-only. |
| 6 | + |
| 7 | +``stem(..., use_line_collection=False)`` |
| 8 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 9 | + |
| 10 | +... is no longer supported. This was a compatibility fallback to a |
| 11 | +former more inefficient representation of the stem lines. |
| 12 | + |
| 13 | +Positional / keyword arguments |
| 14 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 | + |
| 16 | +Passing all but the very few first arguments positionally in the constructors |
| 17 | +of Artists is no longer possible. Most arguments are now keyword-only. |
| 18 | + |
| 19 | +The *emit* and *auto* parameters of ``set_xlim``, ``set_ylim``, |
| 20 | +``set_zlim``, ``set_rlim`` are now keyword-only. |
| 21 | + |
| 22 | +The *transOffset* parameter of `.Collection.set_offset_transform` and the |
| 23 | +various ``create_collection`` methods of legend handlers has been renamed to |
| 24 | +*offset_transform* (consistently with the property name). |
| 25 | + |
| 26 | +``Axes.get_window_extent`` / ``Figure.get_window_extent`` accept only |
| 27 | +*renderer*. This aligns the API with the general `.Artist.get_window_extent` |
| 28 | +API. All other parameters were ignored anyway. |
| 29 | + |
| 30 | +Methods to set parameters in ``LogLocator`` and ``LogFormatter*`` |
| 31 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 32 | + |
| 33 | +In `~.LogFormatter` and derived subclasses, the methods ``base`` and |
| 34 | +``label_minor`` for setting the respective parameter are removed and |
| 35 | +replaced by ``set_base`` and ``set_label_minor``, respectively. |
| 36 | + |
| 37 | +In `~.LogLocator`, the methods ``base`` and ``subs`` for setting the respective |
| 38 | +parameter are removed. Instead, use ``set_params(base=..., subs=...)``. |
| 39 | + |
| 40 | +``Axes.get_renderer_cache`` |
| 41 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 42 | + |
| 43 | +The canvas now takes care of the renderer and whether to cache it or not, |
| 44 | +so the ````Axes.get_renderer_cache`` method is removed. The |
| 45 | +alternative is to call ``axes.figure.canvas.get_renderer()``. |
| 46 | + |
| 47 | +Unused methods in ``Axis``, ``Tick``, ``XAxis``, and ``YAxis`` |
| 48 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 49 | + |
| 50 | +``Tick.label`` is now removed. Use ``Tick.label1`` instead. |
| 51 | + |
| 52 | +The following methods are no longer used and removed without a replacement: |
| 53 | + |
| 54 | +- ``Axis.get_ticklabel_extents`` |
| 55 | +- ``Tick.get_pad_pixels`` |
| 56 | +- ``XAxis.get_text_heights`` |
| 57 | +- ``YAxis.get_text_widths`` |
| 58 | + |
| 59 | +``mlab.stride_windows`` |
| 60 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 61 | + |
| 62 | +... is removed. Use ``numpy.lib.stride_tricks.sliding_window_view`` instead. |
| 63 | + |
| 64 | +``Axes3D`` |
| 65 | +~~~~~~~~~~ |
| 66 | + |
| 67 | +The ``dist`` attribute has been privatized. Use the *zoom* keyword argument in |
| 68 | +`.Axes3D.set_box_aspect` instead. |
| 69 | + |
| 70 | +The ``w_xaxis``, ``w_yaxis``, and ``w_zaxis`` attributes are now removed. |
| 71 | +Instead use ``xaxis``, ``yaxis``, and ``zaxis``. |
| 72 | + |
| 73 | +3D Axis |
| 74 | +~~~~~~~ |
| 75 | + |
| 76 | +``mplot3d.axis3d.Axis.set_pane_pos`` is removed. This is an internal method |
| 77 | +where the provided values are overwritten during drawing. Hence, it does not |
| 78 | +serve any purpose to be directly accessible. |
| 79 | + |
| 80 | +The two helper functions ``mplot3d.axis3d.move_from_center`` and |
| 81 | +``mplot3d.axis3d.tick_update_position`` are considered internal and deprecated. |
| 82 | +If these are required, please vendor the code from the corresponding private |
| 83 | +methods ``_move_from_center`` and ``_tick_update_position``. |
| 84 | + |
| 85 | +``checkdep_usetex`` removed |
| 86 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 87 | + |
| 88 | +This method was only intended to disable tests in case no latex install was |
| 89 | +found. As such, it is considered to be private and for internal use only. |
| 90 | + |
| 91 | +Please vendor the code from a previous version if you need this. |
| 92 | + |
| 93 | +``date_ticker_factory`` removed |
| 94 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 95 | + |
| 96 | +The ``date_ticker_factory`` method in the `matplotlib.dates` module is |
| 97 | +removed. Instead use `~.AutoDateLocator` and `~.AutoDateFormatter` for a |
| 98 | +more flexible and scalable locator and formatter. |
| 99 | + |
| 100 | +If you need the exact ``date_ticker_factory`` behavior, please copy the code |
| 101 | +from a previous version. |
| 102 | + |
| 103 | +``transforms.Affine2D.identity()`` |
| 104 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 105 | + |
| 106 | +... is removed in favor of directly calling the `.Affine2D` constructor with |
| 107 | +no arguments. |
| 108 | + |
| 109 | +Removals in ``testing.decorators`` |
| 110 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 111 | + |
| 112 | +The unused class ``CleanupTestCase`` and decorator ``cleanup`` are removed. |
| 113 | +The function ``check_freetype_version`` is considered internal and removed. |
| 114 | +Vendor the code from a previous version. |
| 115 | + |
| 116 | +``text.get_rotation()`` |
| 117 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 118 | + |
| 119 | +... is removed with no replacement. Copy the previous implementation if |
| 120 | +needed. |
| 121 | + |
| 122 | +Miscellaneous internals |
| 123 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 124 | + |
| 125 | +- ``axes_grid1.axes_size.AddList``; use ``sum(sizes, start=Fixed(0))`` (for |
| 126 | + example) to sum multiple size objects. |
| 127 | +- ``axes_size.Padded``; use ``size + pad`` instead |
| 128 | +- ``axes_size.SizeFromFunc``, ``axes_size.GetExtentHelper`` |
| 129 | +- ``AxisArtistHelper.delta1`` and ``AxisArtistHelper.delta2`` |
| 130 | +- ``axislines.GridHelperBase.new_gridlines`` and |
| 131 | + ``axislines.Axes.new_gridlines`` |
| 132 | +- ``_DummyAxis.dataLim`` and ``_DummyAxis.viewLim``; use |
| 133 | + ``get_data_interval()``, ``set_data_interval()``, ``get_view_interval()``, |
| 134 | + and ``set_view_interval()`` instead. |
| 135 | +- ``ImageMagickBase.delay`` and ``ImageMagickBase.output_args`` |
| 136 | +- ``MathtextBackend``, ``MathtextBackendAgg``, ``MathtextBackendPath``, |
| 137 | + ``MathTextWarning`` |
| 138 | +- ``TexManager.get_font_config``; it previously returned an internal hashed key |
| 139 | + for used for caching purposes. |
| 140 | +- ``TextToPath.get_texmanager``; directly construct a `.texmanager.TexManager` |
| 141 | + instead. |
| 142 | +- ``ticker.is_close_to_int``; use ``math.isclose(x, round(x))`` instead. |
| 143 | +- ``ticker.is_decade``; use ``y = numpy.log(x)/numpy.log(base); |
| 144 | + numpy.isclose(y, numpy.round(y))`` instead. |
0 commit comments