|
| 1 | +Passing extra positional arguments to ``Figure.add_axes`` |
| 2 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 3 | + |
| 4 | +Positional arguments passed to `.Figure.add_axes` other than a rect or an existing |
| 5 | +``Axes`` were previously ignored, and is now an error. |
| 6 | + |
| 7 | + |
| 8 | +Artists explicitly passed in will no longer be filtered by legend() based on their label |
| 9 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 | + |
| 11 | +Previously, artists explicitly passed to ``legend(handles=[...])`` are filtered out if |
| 12 | +their label starts with an underscore. This filter is no longer applied; explicitly |
| 13 | +filter out such artists (``[art for art in artists if not |
| 14 | +art.get_label().startswith('_')]``) if necessary. |
| 15 | + |
| 16 | +Note that if no handles are specified at all, then the default still filters out labels |
| 17 | +starting with an underscore. |
| 18 | + |
| 19 | + |
| 20 | +The parameter of ``Annotation.contains`` and ``Legend.contains`` is renamed to *mouseevent* |
| 21 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 22 | + |
| 23 | +... consistently with `.Artist.contains`. |
| 24 | + |
| 25 | + |
| 26 | +Support for passing the "frac" key in ``annotate(..., arrowprops={"frac": ...})`` |
| 27 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 28 | + |
| 29 | +... has been removed. This key has had no effect since Matplotlib 1.5. |
| 30 | + |
| 31 | + |
| 32 | +Passing non-int or sequence of non-int to ``Table.auto_set_column_width`` |
| 33 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 34 | + |
| 35 | +Column numbers are ints, and formerly passing any other type was effectively ignored. |
| 36 | +This has now become an error. |
| 37 | + |
| 38 | + |
| 39 | +Widgets |
| 40 | +~~~~~~~ |
| 41 | + |
| 42 | +The *visible* attribute getter of ``*Selector`` widgets has been removed; use |
| 43 | +``get_visible`` instead. |
| 44 | + |
| 45 | + |
| 46 | +Auto-closing of figures when switching backend |
| 47 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 48 | + |
| 49 | +Allowable backend switches (i.e. those that do not swap a GUI event loop with another |
| 50 | +one) will not close existing figures. If necessary, call ``plt.close("all")`` before |
| 51 | +switching. |
| 52 | + |
| 53 | + |
| 54 | +``FigureCanvasBase.switch_backends`` |
| 55 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 56 | + |
| 57 | +... has been removed with no replacement. |
| 58 | + |
| 59 | + |
| 60 | +Accessing ``event.guiEvent`` after event handlers return |
| 61 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 62 | + |
| 63 | +... is no longer supported, and ``event.guiEvent`` will be set to None once the event |
| 64 | +handlers return. For some GUI toolkits, it is unsafe to use the event, though you may |
| 65 | +separately stash the object at your own risk. |
| 66 | + |
| 67 | + |
| 68 | +``PdfPages(keep_empty=True)`` |
| 69 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 70 | + |
| 71 | +A zero-page PDF is not valid, thus passing ``keep_empty=True`` to `.backend_pdf.PdfPages` |
| 72 | +and `.backend_pgf.PdfPages`, and the ``keep_empty`` attribute of these classes, is no |
| 73 | +longer allowed, and empty PDF files will not be created. |
| 74 | + |
| 75 | +Furthermore, `.backend_pdf.PdfPages` no longer immediately creates the target file upon |
| 76 | +instantiation, but only when the first figure is saved. To fully control file creation, |
| 77 | +directly pass an opened file object as argument (``with open(path, "wb") as file, |
| 78 | +PdfPages(file) as pdf: ...``). |
| 79 | + |
| 80 | + |
| 81 | +``backend_ps.psDefs`` |
| 82 | +~~~~~~~~~~~~~~~~~~~~~ |
| 83 | + |
| 84 | +The ``psDefs`` module-level variable in ``backend_ps`` has been removed with no |
| 85 | +replacement. |
| 86 | + |
| 87 | + |
| 88 | +Automatic papersize selection in PostScript |
| 89 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 90 | + |
| 91 | +Setting :rc:`ps.papersize` to ``'auto'`` or passing ``papersize='auto'`` to |
| 92 | +`.Figure.savefig` is no longer supported. Either pass an explicit paper type name, or |
| 93 | +omit this parameter to use the default from the rcParam. |
| 94 | + |
| 95 | + |
| 96 | +``RendererAgg.tostring_rgb`` and ``FigureCanvasAgg.tostring_rgb`` |
| 97 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 98 | + |
| 99 | +... have been remove with no direct replacement. Consider using ``buffer_rgba`` instead, |
| 100 | +which should cover most use cases. |
| 101 | + |
| 102 | + |
| 103 | +``NavigationToolbar2QT.message`` has been removed |
| 104 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 105 | + |
| 106 | +... with no replacement. |
| 107 | + |
| 108 | + |
| 109 | +``TexManager.texcache`` |
| 110 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 111 | + |
| 112 | +... is considered private and has been removed. The location of the cache directory is |
| 113 | +clarified in the doc-string. |
| 114 | + |
| 115 | + |
| 116 | +``cbook`` API changes |
| 117 | +~~~~~~~~~~~~~~~~~~~~~ |
| 118 | + |
| 119 | +``cbook.Stack`` has been removed with no replacement. |
| 120 | + |
| 121 | +``Grouper.clean()`` has been removed with no replacement. The Grouper class now cleans |
| 122 | +itself up automatically. |
| 123 | + |
| 124 | +The *np_load* parameter of ``cbook.get_sample_data`` has been removed; `.get_sample_data` |
| 125 | +now auto-loads numpy arrays. Use ``get_sample_data(..., asfileobj=False)`` instead to get |
| 126 | +the filename of the data file, which can then be passed to `open`, if desired. |
| 127 | + |
| 128 | + |
| 129 | +Calling ``paths.get_path_collection_extents`` with empty *offsets* |
| 130 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 131 | + |
| 132 | +Calling `~.get_path_collection_extents` with an empty *offsets* parameter has an |
| 133 | +ambiguous interpretation and is no longer allowed. |
| 134 | + |
| 135 | + |
| 136 | +``bbox.anchored()`` with no explicit container |
| 137 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 138 | + |
| 139 | +Not passing a *container* argument to `.BboxBase.anchored` is no longer supported. |
| 140 | + |
| 141 | + |
| 142 | +``INVALID_NON_AFFINE``, ``INVALID_AFFINE``, ``INVALID`` attributes of ``TransformNode`` |
| 143 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 144 | + |
| 145 | +These attributes have been removed. |
| 146 | + |
| 147 | + |
| 148 | +``axes_grid1`` API changes |
| 149 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 150 | + |
| 151 | +``anchored_artists.AnchoredEllipse`` has been removed. Instead, directly construct an |
| 152 | +`.AnchoredOffsetbox`, an `.AuxTransformBox`, and an `~.patches.Ellipse`, as demonstrated |
| 153 | +in :doc:`/gallery/misc/anchored_artists`. |
| 154 | + |
| 155 | +The ``axes_divider.AxesLocator`` class has been removed. The ``new_locator`` method of |
| 156 | +divider instances now instead returns an opaque callable (which can still be passed to |
| 157 | +``ax.set_axes_locator``). |
| 158 | + |
| 159 | +``axes_divider.Divider.locate`` has been removed; use ``Divider.new_locator(...)(ax, |
| 160 | +renderer)`` instead. |
| 161 | + |
| 162 | +``axes_grid.CbarAxesBase.toggle_label`` has been removed. Instead, use standard methods |
| 163 | +for manipulating colorbar labels (`.Colorbar.set_label`) and tick labels |
| 164 | +(`.Axes.tick_params`). |
| 165 | + |
| 166 | +``inset_location.InsetPosition`` has been removed; use `~.Axes.inset_axes` instead. |
| 167 | + |
| 168 | + |
| 169 | +``axisartist`` API changes |
| 170 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 171 | + |
| 172 | +The ``axisartist.axes_grid`` and ``axisartist.axes_rgb`` modules, which provide wrappers |
| 173 | +combining the functionality of `.axes_grid1` and `.axisartist`, have been removed; |
| 174 | +directly use e.g. ``AxesGrid(..., axes_class=axislines.Axes)`` instead. |
| 175 | + |
| 176 | +Calling an axisartist Axes to mean `~matplotlib.pyplot.axis` has been removed; explicitly |
| 177 | +call the method instead. |
| 178 | + |
| 179 | +``floating_axes.GridHelperCurveLinear.get_data_boundary`` has been removed. Use |
| 180 | +``grid_finder.extreme_finder(*[None] * 5)`` to get the extremes of the grid. |
0 commit comments