1API Changes for 3.1.0 2===================== 3 4.. contents:: 5 :local: 6 :depth: 1 7 8 9Behavior changes 10---------------- 11 12 13Matplotlib.use 14~~~~~~~~~~~~~~ 15Switching backends via `matplotlib.use` is now allowed by default, 16regardless of whether `matplotlib.pyplot` has been imported. If the user 17tries to switch from an already-started interactive backend to a different 18interactive backend, an `ImportError` will be raised. 19 20Invalid points in PathCollections 21~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22PathCollections created with `~.Axes.scatter` now keep track of invalid points. 23Previously, points with nonfinite (infinite or nan) coordinates would not be 24included in the offsets (as returned by `.PathCollection.get_offsets`) of a 25`.PathCollection` created by `~.Axes.scatter`, and points with nonfinite values 26(as specified by the *c* kwarg) would not be included in the array (as returned 27by `.PathCollection.get_array`) 28 29Such points are now included, but masked out by returning a masked array. 30 31If the *plotnonfinite* kwarg to `~.Axes.scatter` is set, then points 32with nonfinite values are plotted using the bad color of the 33`.collections.PathCollection`\ 's colormap (as set by 34:meth:`.colors.Colormap.set_bad`). 35 36Alpha blending in imshow of RBGA input 37~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 39The alpha-channel of RBGA images is now re-sampled independently of 40RGB channels. While this is a bug fix, it does change the output and 41may result in some down-stream image comparison tests to fail. 42 43Autoscaling 44~~~~~~~~~~~ 45On log-axes where a single value is plotted at a "full" decade (1, 10, 100, 46etc.), the autoscaling now expands the axis symmetrically around that point, 47instead of adding a decade only to the right. 48 49Log-scaled axes 50~~~~~~~~~~~~~~~ 51When the default `.LogLocator` would generate no ticks for an axis (e.g., an 52axis with limits from 0.31 to 0.39) or only a single tick, it now instead falls 53back on the linear `.AutoLocator` to pick reasonable tick positions. 54 55`.Figure.add_subplot` with no arguments 56~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 57Calling `.Figure.add_subplot()` with no positional arguments used to do 58nothing; this now is equivalent to calling ``add_subplot(111)`` instead. 59 60`~.Axes.bxp` and rcparams 61~~~~~~~~~~~~~~~~~~~~~~~~~ 62`~.Axes.bxp` now respects :rc:`boxplot.boxprops.linewidth` even when 63*patch_artist* is set. 64Previously, when the *patch_artist* parameter was set, `~.Axes.bxp` would ignore 65:rc:`boxplot.boxprops.linewidth`. This was an oversight -- in particular, 66`~.Axes.boxplot` did not ignore it. 67 68Major/minor tick collisions 69~~~~~~~~~~~~~~~~~~~~~~~~~~~ 70 71Minor ticks that collide with major ticks are now hidden by default. 72Previously, certain locator classes (`~.ticker.LogLocator`, 73`~.ticker.AutoMinorLocator`) contained custom logic to avoid emitting 74tick locations that collided with major ticks when they were used as 75minor locators. This logic has now moved to the `~.axis.Axis` class, 76and is used regardless of the locator class. You can control this 77behavior via the `~.Axis.remove_overlapping_locs` attribute on 78`~.axis.Axis`. 79 80If you were relying on both the major and minor tick labels to appear 81on the same tick, you may need to update your code. For example, the 82following snippet :: 83 84 import numpy as np 85 import matplotlib.dates as mdates 86 import matplotlib.pyplot as plt 87 88 t = np.arange("2018-11-03", "2018-11-06", dtype="datetime64") 89 x = np.random.rand(len(t)) 90 91 fig, ax = plt.subplots() 92 ax.plot(t, x) 93 ax.xaxis.set( 94 major_locator=mdates.DayLocator(), 95 major_formatter=mdates.DateFormatter("\n%a"), 96 minor_locator=mdates.HourLocator((0, 6, 12, 18)), 97 minor_formatter=mdates.DateFormatter("%H:%M"), 98 ) 99 # disable removing overlapping locations 100 ax.xaxis.remove_overlapping_locs = False 101 plt.show() 102 103labeled days using major ticks, and hours and minutes using minor 104ticks and added a newline to the major ticks labels to avoid them 105crashing into the minor tick labels. Setting the 106`~.Axis.remove_overlapping_locs` property (also accessible via 107`~.Axis.set_remove_overlapping_locs` / 108`~.Axis.get_remove_overlapping_locs` and `~.pyplot.setp`) disables 109removing overlapping tick locations. 110 111The major tick labels could also be adjusted include hours and 112minutes, as the minor ticks are gone, so the ``major_formatter`` 113would be:: 114 115 mdates.DateFormatter("%H:%M\n%a") 116 117usetex support 118~~~~~~~~~~~~~~ 119Previously, if :rc:`text.usetex` was True, then constructing a `.TextPath` on 120a non-mathtext string with ``usetex=False`` would rely on the mathtext parser 121(but not on usetex support!) to parse the string. The mathtext parser is not 122invoked anymore, which may cause slight changes in glyph positioning. 123 124get_window_extents 125~~~~~~~~~~~~~~~~~~ 126 127`.matplotlib.axes.Axes.get_window_extent` used to return a bounding box 128that was slightly larger than the axes, presumably to take into account 129the ticks that may be on a spine. However, it was not scaling the tick sizes 130according to the dpi of the canvas, and it did not check if the ticks were 131visible, or on the spine. 132 133Now `.matplotlib.axes.Axes.get_window_extent` just returns the axes extent 134with no padding for ticks. 135 136This affects `.matplotlib.axes.Axes.get_tightbbox` in cases where there are 137outward ticks with no tick labels, and it also removes the (small) pad around 138axes in that case. 139 140`.spines.Spine.get_window_extent` now takes into account ticks that are on the 141spine. 142 143Sankey 144~~~~~~ 145Previously, `.Sankey.add` would only accept a single string as the *labels* 146argument if its length is equal to the number of flows, in which case it would 147use one character of the string for each flow. 148 149The behavior has been changed to match the documented one: when a single string 150is passed, it is used to label all the flows. 151 152`~.font_manager.FontManager` scores 153~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 154 155`.font_manager.FontManager.score_weight` is now more strict with its 156inputs. Previously, when a weight string was passed to 157`.font_manager.FontManager.score_weight`, 158 159- if the weight was the string representation of an integer, it would be 160 converted to that integer, 161- otherwise, if the weight was not a standard weight name, it would be silently 162 replaced by a value of 500 ("normal" weight). 163 164`.font_manager.FontManager.score_weight` now raises an exception on such inputs. 165 166Text alignment 167~~~~~~~~~~~~~~ 168 169Text alignment was previously incorrect, in particular for multiline text 170objects with large descenders (i.e. subscripts) and rotated text. These have 171been fixed and made more consistent, but could make old code that has 172compensated for this no longer have the correct alignment. 173 174Upper case color strings 175~~~~~~~~~~~~~~~~~~~~~~~~ 176 177Support for passing single-letter colors (one of "rgbcmykw") as UPPERCASE 178characters is deprecated; these colors will become case-sensitive (lowercase) 179after the deprecation period has passed. 180 181The goal is to decrease the number of ambiguous cases when using the ``data`` 182keyword to plotting methods; e.g. ``plot("X", "Y", data={"X": ..., "Y": ...})`` 183will not warn about "Y" possibly being a color anymore after the deprecation 184period has passed. 185 186Degenerate limits 187~~~~~~~~~~~~~~~~~ 188 189When bounds passed to `~.axes.Axes.set_xlim` are degenerate (i.e. the 190lower and upper value are equal), the method used to "expand" the 191bounds now matches the expansion behavior of autoscaling when the plot 192contains a single x-value, and should in particular produce nicer 193limits for non-linear scales. 194 195`~.Axes.plot` format string parsing 196~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 197In certain cases, `~.Axes.plot` would previously accept format strings 198specifying more than one linestyle (e.g. ``"---."`` which specifies both 199``"--"`` and ``"-."``); only use one of them would be used. This now raises a 200`ValueError` instead. 201 202HTMLWriter 203~~~~~~~~~~ 204The HTMLWriter constructor is more strict: it no longer normalizes unknown 205values of *default_mode* to 'loop', but errors out instead. 206 207AFM parsing 208~~~~~~~~~~~ 209In accordance with the AFM spec, the AFM parser no longer truncates the 210``UnderlinePosition`` and ``UnderlineThickness`` fields to integers. 211 212The ``Notice`` field (which can only be publicly accessed by the deprecated 213``afm.parse_afm`` API) is no longer decoded to a `str`, but instead kept as 214`bytes`, to support non-conformant AFM files that use non-ASCII characters in 215that field. 216 217`.Artist.set` keyword normalisation 218~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 219`.Artist.set` now normalizes keywords before sorting them. Previously it sorted 220its keyword arguments in reverse alphabetical order (with a special-case to 221put ``color`` at the end) before applying them. 222 223It now normalizes aliases (and, as above, emits a warning on duplicate 224properties) before doing the sorting (so ``c`` goes to the end too). 225 226`.Axes.tick_params` argument checking 227~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 228Previously `.Axes.tick_params` silently did nothing when an invalid *axis* 229parameter was supplied. This behavior has been changed to raise a `ValueError` 230instead. 231 232`.Axes.hist` output 233~~~~~~~~~~~~~~~~~~~ 234 235Input that consists of multiple empty lists will now return a list of histogram 236values for each one of the lists. For example, an input of ``[[],[]]`` will 237return 2 lists of histogram values. Previously, a single list was returned. 238 239``backend_bases.TimerBase.remove_callback`` future signature change 240~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 241 242Currently, ``backend_bases.TimerBase.remove_callback(func, *args, 243**kwargs)`` removes a callback previously added by 244``backend_bases.Timer.add_callback(func, *args, **kwargs)``, but if 245``*args, **kwargs`` is not passed in (i.e., 246``TimerBase.remove_callback(func)``), then the first callback with a 247matching ``func`` is removed, regardless of whether it was added with 248or without ``*args, **kwargs``. 249 250In a future version, `.TimerBase.remove_callback` will always use the latter 251behavior (not consider ``*args, **kwargs``); to specifically consider them, add 252the callback as a `functools.partial` object :: 253 254 cb = timer.add_callback(functools.partial(func, *args, **kwargs)) 255 # ... 256 # later 257 timer.remove_callback(cb) 258 259`.TimerBase.add_callback` was modified to return *func* to 260simplify the above usage (previously it returned None); this also 261allows using it as a decorator. 262 263The new API is modelled after `atexit.register` / `atexit.unregister`. 264 265`~.container.StemContainer` performance increase 266~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 267 268`~.container.StemContainer` objects can now store a 269`~.collections.LineCollection` object instead of a list of 270`~.lines.Line2D` objects for stem lines plotted using 271`~.Axes.stem`. This gives a very large performance boost to displaying 272and moving `~.Axes.stem` plots. 273 274This will become the default behaviour in Matplotlib 3.3. To use it 275now, the *use_line_collection* keyword argument to `~.Axes.stem` can 276be set to `True` :: 277 278 ax.stem(..., use_line_collection=True) 279 280Individual line segments can be extracted from the 281`~.collections.LineCollection` using 282`~.collections.LineCollection.get_segments()`. See the 283`~.collections.LineCollection` documentation for other methods to 284retrieve the collection properties. 285 286 287`~matplotlib.colorbar.ColorbarBase` inheritance 288~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 289 290`matplotlib.colorbar.ColorbarBase` is no longer a subclass of 291`.cm.ScalarMappable`. This inheritance lead to a confusing situation 292where the `.cm.ScalarMappable` passed to `matplotlib.colorbar.Colorbar` 293(`~.Figure.colorbar`) had a ``set_norm`` method, as did the colorbar. 294The colorbar is now purely a follower to the `.ScalarMappable` norm and 295colormap, and the old inherited methods 296`~matplotlib.colorbar.ColorbarBase.set_norm`, 297`~matplotlib.colorbar.ColorbarBase.set_cmap`, 298`~matplotlib.colorbar.ColorbarBase.set_clim` are deprecated, as are 299the getter versions of those calls. To set the norm associated with a 300colorbar do ``colorbar.mappable.set_norm()`` etc. 301 302 303FreeType and libpng search paths 304~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 305The ``MPLBASEDIRLIST`` environment variables and ``basedirlist`` entry in 306``setup.cfg`` have no effect anymore. Instead, if building in situations where 307FreeType or libpng are not in the compiler or linker's default path, set the 308standard environment variables ``CFLAGS``/``LDFLAGS`` on Linux or OSX, or 309``CL``/``LINK`` on Windows, to indicate the relevant paths. 310 311See details in :doc:`/users/installing`. 312 313Setting artist properties twice or more in the same call 314~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 315Setting the same artist property multiple time via aliases is deprecated. 316Previously, code such as :: 317 318 plt.plot([0, 1], c="red", color="blue") 319 320would emit a warning indicating that ``c`` and ``color`` are aliases 321of one another, and only keep the ``color`` kwarg. This behavior has 322been deprecated; in a future version, this will raise a TypeError, 323similar to Python's behavior when a keyword argument is passed twice :: 324 325 plt.plot([0, 1], c="red", c="blue") 326 327This warning is raised by `~.cbook.normalize_kwargs`. 328 329Path code types 330~~~~~~~~~~~~~~~ 331Path code types like ``Path.MOVETO`` are now ``np.uint8`` instead of ``int`` 332``Path.STOP``, ``Path.MOVETO``, ``Path.LINETO``, ``Path.CURVE3``, 333``Path.CURVE4`` and ``Path.CLOSEPOLY`` are now of the type ``Path.code_type`` 334(``np.uint8`` by default) instead of plain ``int``. This makes their type 335match the array value type of the ``Path.codes`` array. 336 337LaTeX code in matplotlibrc file 338~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 339Previously, the rc file keys ``pgf.preamble`` and ``text.latex.preamble`` were 340parsed using commmas as separators. This would break valid LaTeX code, such as:: 341 342 \usepackage[protrusion=true, expansion=false]{microtype} 343 344The parsing has been modified to pass the complete line to the LaTeX system, 345keeping all commas. Passing a list of strings from within a Python script still 346works as it used to. Passing a list containing non-strings now fails, instead 347of coercing the results to strings. 348 349`.Axes.spy` 350~~~~~~~~~~~ 351 352The method `.Axes.spy` now raises a `TypeError` for the keyword 353arguments *interpolation* and *linestyle* instead of silently ignoring 354them. 355 356Furthermore, `.Axes.spy` spy does now allow for an *extent* argument 357(was silently ignored so far). 358 359A bug with ``Axes.spy(..., origin='lower')`` is fixed. Previously this 360flipped the data but not the y-axis resulting in a mismatch between 361axes labels and actual data indices. Now, *origin='lower'* flips both 362the data and the y-axis labels. 363 364Boxplot tick methods 365~~~~~~~~~~~~~~~~~~~~ 366 367The *manage_xticks* parameter of `~.Axes.boxplot` and `~.Axes.bxp` has 368been renamed (with a deprecation period) to *manage_ticks*, to take 369into account the fact that it manages either x or y ticks depending on 370the *vert* parameter. 371 372When ``manage_ticks=True`` (the default), these methods now attempt to 373take previously drawn boxplots into account when setting the axis 374limits, ticks, and tick labels. 375 376MouseEvents 377~~~~~~~~~~~ 378MouseEvents now include the event name in their ``str()``. 379Previously they contained the prefix "MPL MouseEvent". 380 381RGBA buffer return type 382~~~~~~~~~~~~~~~~~~~~~~~ 383 384`.FigureCanvasAgg.buffer_rgba` and `.RendererAgg.buffer_rgba` now 385return a memoryview The ``buffer_rgba`` method now allows direct 386access to the renderer's underlying buffer (as a ``(m, n, 4)``-shape 387memoryview) rather than copying the data to a new bytestring. This is 388consistent with the behavior on Py2, where a buffer object was 389returned. 390 391 392`matplotlib.font_manager.win32InstalledFonts` return type 393~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 394`matplotlib.font_manager.win32InstalledFonts` returns an empty list instead 395of None if no fonts are found. 396 397`.Axes.fmt_xdata` and `.Axes.fmt_ydata` error handling 398~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 399 400Previously, if the user provided a `.Axes.fmt_xdata` or 401`.Axes.fmt_ydata` function that raised a `TypeError` (or set them to a 402non-callable), the exception would be silently ignored and the default 403formatter be used instead. This is no longer the case; the exception 404is now propagated out. 405 406Deprecation of redundant `.Tick` attributes 407~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 408 409The ``gridOn``, ``tick1On``, ``tick2On``, ``label1On``, and ``label2On`` 410`~.Tick` attributes have been deprecated. Directly get and set the visibility 411on the underlying artists, available as the ``gridline``, ``tick1line``, 412``tick2line``, ``label1``, and ``label2`` attributes. 413 414The ``label`` attribute, which was an alias for ``label1``, has been 415deprecated. 416 417Subclasses that relied on setting the above visibility attributes needs to be 418updated; see e.g. :file:`examples/api/skewt.py`. 419 420Passing a Line2D's drawstyle together with the linestyle is deprecated 421~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 422 423Instead of ``plt.plot(..., linestyle="steps--")``, use ``plt.plot(..., 424linestyle="--", drawstyle="steps")``. ``ds`` is now an alias for ``drawstyle``. 425 426 427``pgi`` support dropped 428----------------------- 429 430Support for ``pgi`` in the GTK3 backends has been dropped. ``pgi`` is 431an alternative implementation to ``PyGObject``. ``PyGObject`` should 432be used instead. 433 434rcParam changes 435--------------- 436 437Removed 438~~~~~~~ 439The following deprecated rcParams have been removed: 440 441- ``text.dvipnghack`` 442- ``nbagg.transparent`` (use :rc:`figure.facecolor` instead) 443- ``plugins.directory`` 444- ``axes.hold`` 445- ``backend.qt4`` and ``backend.qt5`` (set the :envvar:`QT_API` environment 446 variable instead) 447 448Deprecated 449~~~~~~~~~~ 450The associated validator functions ``rcsetup.validate_qt4`` and 451``validate_qt5`` are deprecated. 452 453The ``verbose.fileo`` and ``verbose.level`` rcParams have been deprecated. 454These have had no effect since the switch from Matplotlib's old custom Verbose 455logging to the stdlib's `logging` module. In addition the 456``rcsetup.validate_verbose`` function is deprecated. 457 458The ``text.latex.unicode`` rcParam now defaults to ``True`` and is 459deprecated (i.e., in future versions 460of Matplotlib, unicode input will always be supported). 461Moreover, the underlying implementation now uses ``\usepackage[utf8]{inputenc}`` 462instead of ``\usepackage{ucs}\usepackage[utf8x]{inputenc}``. 463 464Exception changes 465----------------- 466- `mpl_toolkits.axes_grid1.axes_size.GetExtentHelper` now raises `ValueError` 467 for invalid directions instead of `KeyError`. 468- Previously, subprocess failures in the animation framework would raise either 469 in a `RuntimeError` or a `ValueError` depending on when the error occurred. 470 They now raise a `subprocess.CalledProcessError` with attributes set as 471 documented by the exception class. 472- In certain cases, Axes methods (and pyplot functions) used to raise 473 a `RuntimeError` if they were called with a ``data`` kwarg and 474 otherwise mismatched arguments. They now raise a `TypeError` 475 instead. 476- `.Axes.streamplot` does not support irregularly gridded ``x`` and ``y`` values. 477 So far, it used to silently plot an incorrect result. This has been changed to 478 raise a `ValueError` instead. 479- The `.streamplot.Grid` class, which is internally used by streamplot 480 code, also throws a `ValueError` when irregularly gridded values are 481 passed in. 482 483Removals 484-------- 485The following deprecated APIs have been removed: 486 487Classes and methods 488~~~~~~~~~~~~~~~~~~~ 489- ``Verbose`` (replaced by python logging library) 490- ``artist.Artist.hitlist`` (no replacement) 491- ``artist.Artist.is_figure_set`` (use ``artist.figure is not None`` instead) 492- ``axis.Axis.unit_data`` (use ``axis.Axis.units`` instead) 493- ``backend_bases.FigureCanvasBase.onRemove`` (no replacement) 494 ``backend_bases.FigureManagerBase.show_popup`` (this never did anything) 495- ``backend_wx.SubplotToolWx`` (no replacement) 496- ``backend_wx.Toolbar`` (use ``backend_wx.NavigationToolbar2Wx`` instead) 497- ``cbook.align_iterators`` (no replacement) 498- ``contour.ContourLabeler.get_real_label_width`` (no replacement) 499- ``legend.Legend.draggable`` (use `legend.Legend.set_draggable()` instead) 500- ``texmanager.TexManager.postscriptd``, ``texmanager.TexManager.pscnt``, 501 ``texmanager.TexManager.make_ps``, ``texmanager.TexManager.get_ps_bbox`` 502 (no replacements) 503 504Arguments 505~~~~~~~~~ 506- The *fig* kwarg to `.GridSpec.get_subplot_params` and 507 `.GridSpecFromSubplotSpec.get_subplot_params` (use the argument 508 *figure* instead) 509- Passing 'box-forced' to `.Axes.set_adjustable` (use 'box' instead) 510- Support for the strings 'on'/'true'/'off'/'false' to mean 511 `True` / `False` (directly use `True` / `False` instead). 512 The following functions are affected: 513 514 - `.axes.Axes.grid` 515 - `.Axes3D.grid` 516 - `.Axis.set_tick_params` 517 - `.pyplot.box` 518- Using `.pyplot.axes` with an `.axes.Axes` type argument 519 (use `.pyplot.sca` instead) 520 521Other 522~~~~~ 523The following miscellaneous API elements have been removed 524 525- svgfont support (in :rc:`svg.fonttype`) 526- Logging is now done with the standard python ``logging`` library. 527 ``matplotlib.verbose`` and the command line switches ``--verbose-LEVEL`` have 528 been removed. 529 530 To control the logging output use:: 531 532 import logging 533 logger = logging.getLogger('matplotlib') 534 logger.setLevel(logging.INFO) 535 # configure log handling: Either include it into your ``logging`` hierarchy, 536 # e.g. by configuring a root looger using ``logging.basicConfig()``, 537 # or add a standalone handler to the matplotlib logger: 538 logger.addHandler(logging.StreamHandler()) 539 540- ``__version__numpy__`` 541- ``collections.CIRCLE_AREA_FACTOR`` 542- ``font_manager.USE_FONTCONFIG`` 543- ``font_manager.cachedir`` 544 545:mod:`matplotlib.mlab` removals 546------------------------------- 547Lots of code inside the :mod:`matplotlib.mlab` module which was deprecated 548in Matplotlib 2.2 has been removed. See below for a list: 549 550- ``mlab.exp_safe`` (use `numpy.exp` instead) 551- ``mlab.amap`` 552- ``mlab.logspace`` (use `numpy.logspace` instead) 553- ``mlab.rms_flat`` 554- ``mlab.l1norm`` (use ``numpy.linalg.norm(a, ord=1)`` instead) 555- ``mlab.l2norm`` (use ``numpy.linalg.norm(a, ord=2)`` instead) 556- ``mlab.norm_flat`` (use ``numpy.linalg.norm(a.flat, ord=2)`` instead) 557- ``mlab.frange`` (use `numpy.arange` instead) 558- ``mlab.identity`` (use `numpy.identity` instead) 559- ``mlab.base_repr`` 560- ``mlab.binary_repr`` 561- ``mlab.ispower2`` 562- ``mlab.log2`` (use `numpy.log2` instead) 563- ``mlab.isvector`` 564- ``mlab.movavg`` 565- ``mlab.safe_isinf`` (use `numpy.isinf` instead) 566- ``mlab.safe_isnan`` (use `numpy.isnan` instead) 567- ``mlab.cohere_pairs`` (use `scipy.signal.coherence` instead) 568- ``mlab.entropy`` (use `scipy.stats.entropy` instead) 569- ``mlab.normpdf`` (use `scipy.stats.norm.pdf` instead) 570- ``mlab.find`` (use ``np.nonzero(np.ravel(condition))`` instead) 571- ``mlab.longest_contiguous_ones`` 572- ``mlab.longest_ones`` 573- ``mlab.PCA`` 574- ``mlab.prctile`` (use `numpy.percentile` instead) 575- ``mlab.prctile_rank`` 576- ``mlab.center_matrix`` 577- ``mlab.rk4`` (use `scipy.integrate.ode` instead) 578- ``mlab.bivariate_normal`` 579- ``mlab.get_xyz_where`` 580- ``mlab.get_sparse_matrix`` 581- ``mlab.dist`` (use `numpy.hypot` instead) 582- ``mlab.dist_point_to_segment`` 583- ``mlab.griddata`` (use `scipy.interpolate.griddata`) 584- ``mlab.less_simple_linear_interpolation`` (use `numpy.interp`) 585- ``mlab.slopes`` 586- ``mlab.stineman_interp`` 587- ``mlab.segments_intersect`` 588- ``mlab.fftsurr`` 589- ``mlab.offset_line`` 590- ``mlab.quad2cubic`` 591- ``mlab.vector_lengths`` 592- ``mlab.distances_along_curve`` 593- ``mlab.path_length`` 594- ``mlab.cross_from_above`` 595- ``mlab.cross_from_below`` 596- ``mlab.contiguous_regions`` (use `.cbook.contiguous_regions` instead) 597- ``mlab.is_closed_polygon`` 598- ``mlab.poly_between`` 599- ``mlab.poly_below`` 600- ``mlab.inside_poly`` 601- ``mlab.csv2rec`` 602- ``mlab.rec2csv`` (use `numpy.recarray.tofile` instead) 603- ``mlab.rec2text`` (use `numpy.recarray.tofile` instead) 604- ``mlab.rec_summarize`` 605- ``mlab.rec_join`` 606- ``mlab.recs_join`` 607- ``mlab.rec_groupby`` 608- ``mlab.rec_keep_fields`` 609- ``mlab.rec_drop_fields`` 610- ``mlab.rec_append_fields`` 611- ``mlab.csvformat_factory`` 612- ``mlab.get_formatd`` 613- ``mlab.FormatDatetime`` (use `datetime.datetime.strftime` instead) 614- ``mlab.FormatDate`` (use `datetime.date.strftime` instead) 615- ``mlab.FormatMillions``, ``mlab.FormatThousands``, ``mlab.FormatPercent``, 616 ``mlab.FormatBool``, ``mlab.FormatInt``, ``mlab.FormatFloat``, 617 ``mlab.FormatFormatStr``, ``mlab.FormatString``, ``mlab.FormatObj`` 618- ``mlab.donothing_callback`` 619 620`pylab` removals 621---------------- 622Lots of code inside the :mod:`matplotlib.mlab` module which was deprecated 623in Matplotlib 2.2 has been removed. This means the following functions are 624no longer available in the `pylab` module: 625 626- ``amap`` 627- ``base_repr`` 628- ``binary_repr`` 629- ``bivariate_normal`` 630- ``center_matrix`` 631- ``csv2rec`` (use `numpy.recarray.tofile` instead) 632- ``dist`` (use `numpy.hypot` instead) 633- ``dist_point_to_segment`` 634- ``distances_along_curve`` 635- ``entropy`` (use `scipy.stats.entropy` instead) 636- ``exp_safe`` (use `numpy.exp` instead) 637- ``fftsurr`` 638- ``find`` (use ``np.nonzero(np.ravel(condition))`` instead) 639- ``frange`` (use `numpy.arange` instead) 640- ``get_sparse_matrix`` 641- ``get_xyz_where`` 642- ``griddata`` (use `scipy.interpolate.griddata` instead) 643- ``identity`` (use `numpy.identity` instead) 644- ``inside_poly`` 645- ``is_closed_polygon`` 646- ``ispower2`` 647- ``isvector`` 648- ``l1norm`` (use ``numpy.linalg.norm(a, ord=1)`` instead) 649- ``l2norm`` (use ``numpy.linalg.norm(a, ord=2)`` instead) 650- ``log2`` (use `numpy.log2` instead) 651- ``longest_contiguous_ones`` 652- ``longest_ones`` 653- ``movavg`` 654- ``norm_flat`` (use ``numpy.linalg.norm(a.flat, ord=2)`` instead) 655- ``normpdf`` (use `scipy.stats.norm.pdf` instead) 656- ``path_length`` 657- ``poly_below`` 658- ``poly_between`` 659- ``prctile`` (use `numpy.percentile` instead) 660- ``prctile_rank`` 661- ``rec2csv`` (use `numpy.recarray.tofile` instead) 662- ``rec_append_fields`` 663- ``rec_drop_fields`` 664- ``rec_join`` 665- ``rk4`` (use `scipy.integrate.ode` instead) 666- ``rms_flat`` 667- ``segments_intersect`` 668- ``slopes`` 669- ``stineman_interp`` 670- ``vector_lengths`` 671 672mplot3d changes 673--------------- 674 675Voxel shading 676~~~~~~~~~~~~~ 677`.Axes3D.voxels` now shades the resulting voxels; for more details see 678What's new. The previous behavior can be achieved by passing :: 679 680 ax.voxels(.., shade=False) 681 682 683 684Equal aspect axes disabled 685~~~~~~~~~~~~~~~~~~~~~~~~~~ 686 687Setting the aspect on 3D axes previously returned non-sensical results 688(e.g. see :ghissue:`1077`). Calling ``ax.set_aspect('equal')`` or 689``ax.set_aspect(num)`` on a 3D axes now raises a 690`NotImplementedError`. 691 692`.Poly3DCollection.set_zsort` 693~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 694 695`.Poly3DCollection.set_zsort` no longer silently ignores invalid 696inputs, or `False` (which was always broken). Passing `True` to mean 697``"average"`` is deprecated. 698 699Testing 700------- 701The ``--no-network`` flag to ``tests.py`` has been removed (no test requires 702internet access anymore). If it is desired to disable internet access both for 703old and new versions of Matplotlib, use ``tests.py -m 'not network'`` (which is 704now a no-op). 705 706The image comparison test decorators now skip (rather than xfail) the test for 707uncomparable formats. The affected decorators are `~.image_comparison` and 708`~.check_figures_equal`. The deprecated `~.ImageComparisonTest` class is 709likewise changed. 710 711Dependency changes 712------------------ 713 714NumPy 715~~~~~ 716Matplotlib 3.1 now requires NumPy>=1.11. 717 718ghostscript 719~~~~~~~~~~~ 720Support for ghostscript 8.60 (released in 2007) has been removed. The oldest 721supported version of ghostscript is now 9.0 (released in 2010). 722 723Mathtext changes 724---------------- 725- In constructs such as ``"$1~2$"``, mathtext now interprets the tilde as a 726 space, consistently with TeX (this was previously a parse error). 727 728Deprecations 729~~~~~~~~~~~~ 730- The ``\stackrel`` mathtext command has been deprecated (it behaved differently 731 from LaTeX's ``\stackrel``. To stack two mathtext expressions, use 732 ``\genfrac{left-delim}{right-delim}{fraction-bar-thickness}{}{top}{bottom}``. 733- The ``\mathcircled`` mathtext command (which is not a real TeX command) 734 is deprecated. Directly use unicode characters (e.g. 735 ``"\N{CIRCLED LATIN CAPITAL LETTER A}"`` or ``"\u24b6"``) instead. 736- Support for setting :rc:`mathtext.default` to circled is deprecated. 737 738Signature deprecations 739---------------------- 740The following signature related behaviours are deprecated: 741 742- The *withdash* keyword argument to `.Axes.text()`. Consider using 743 `.Axes.annotate()` instead. 744- Passing (n, 1)-shaped error arrays to `.Axes.errorbar()`, which was not 745 documented and did not work for ``n = 2``. Pass a 1D array instead. 746- The *frameon* kwarg to `~.Figure.savefig` and the :rc:`savefig.frameon` rcParam. 747 To emulate ``frameon = False``, set *facecolor* to fully 748 transparent (``"none"``, or ``(0, 0, 0, 0)``). 749- Passing a non-1D (typically, (n, 1)-shaped) input to `.Axes.pie`. 750 Pass a 1D array instead. 751- The `.TextPath` constructor used to silently drop ignored arguments; this 752 behavior is deprecated. 753- The *usetex* parameter of `.TextToPath.get_text_path` is deprecated and 754 folded into the *ismath* parameter, which can now take the values 755 `False`, `True`, and ``"TeX"``, consistently with other low-level 756 text processing functions. 757- Passing ``'normal'`` to `.axes.Axes.axis()` is deprecated, use 758 ``ax.axis('auto')`` instead. 759- Passing the *block* argument of `.pyplot.show` positionally is deprecated; it 760 should be passed by keyword. 761- When using the nbagg backend, `.pyplot.show` used to silently accept and ignore 762 all combinations of positional and keyword arguments. This behavior is 763 deprecated. 764- The unused *shape* and *imlim* parameters to `.Axes.imshow` are 765 deprecated. To avoid triggering the deprecation warning, the *filternorm*, 766 *filterrad*, *resample*, and *url* arguments should be passed by 767 keyword. 768- The *interp_at_native* parameter to `.BboxImage`, which has had no effect 769 since Matplotlib 2.0, is deprecated. 770- All arguments to the ``matplotlib.cbook.deprecation.deprecated`` decorator 771 and ``matplotlib.cbook.deprecation.warn_deprecated`` function, except the 772 first one (the version where the deprecation occurred), are now keyword-only. 773 The goal is to avoid accidentally setting the "message" argument when the 774 "name" (or "alternative") argument was intended, as this has repeatedly 775 occurred in the past. 776- The arguments of `matplotlib.testing.compare.calculate_rms` have been renamed 777 from ``expectedImage, actualImage``, to ``expected_image, actual_image``. 778- Passing positional arguments to `.Axis.set_ticklabels` beyond *ticklabels* 779 itself has no effect, and support for them is deprecated. 780- Passing ``shade=None`` to `~.axes3d.Axes3D.plot_surface` is deprecated. This 781 was an unintended implementation detail with the same semantics as 782 ``shade=False``. Please use the latter code instead. 783- `matplotlib.ticker.MaxNLocator` and its *set_params* method will issue 784 a warning on unknown keyword arguments instead of silently ignoring them. 785 Future versions will raise an error. 786 787Changes in parameter names 788-------------------------- 789 790- The *arg* parameter to `matplotlib.use` has been renamed to *backend*. 791 792 This will only affect cases where that parameter has been set 793 as a keyword argument. The common usage pattern as a positional argument 794 ``matplotlib.use('Qt5Agg')`` is not affected. 795- The *normed* parameter to `.Axes.hist2d` has been renamed to *density*. 796- The *s* parameter to `.Annotation` (and indirectly `.Axes.annotate`) has 797 been renamed to *text*. 798- The *tolerence* parameter to 799 `.bezier.find_bezier_t_intersecting_with_closedpath`, 800 `.bezier.split_bezier_intersecting_with_closedpath`, 801 ``bezier.find_r_to_boundary_of_closedpath``, 802 `.bezier.split_path_inout` and `.bezier.check_if_parallel` has been renamed to 803 *tolerance*. 804 805In each case, the old parameter name remains supported (it cannot be used 806simultaneously with the new name), but support for it will be dropped in 807Matplotlib 3.3. 808 809Class/method/attribute deprecations 810----------------------------------- 811 812 813 814Support for custom backends that do not provide a 815`.GraphicsContextBase.set_hatch_color` method is deprecated. We 816suggest that custom backends let their ``GraphicsContext`` class 817inherit from `.GraphicsContextBase`, to at least provide stubs for all 818required methods. 819 820- ``spine.Spine.is_frame_like`` 821 822This has not been used in the codebase since its addition in 2009. 823 824- ``axis3d.Axis.get_tick_positions`` 825 826 This has never been used internally, there is no equivalent method exists on 827 the 2D Axis classes, and despite the similar name, it has a completely 828 different behavior from the 2D Axis' `axis.Axis.get_ticks_position` method. 829- ``.backend_pgf.LatexManagerFactory`` 830 831- ``mpl_toolkits.axisartist.axislines.SimpleChainedObjects`` 832- ``mpl_toolkits.Axes.AxisDict`` 833 834Internal Helper Functions 835~~~~~~~~~~~~~~~~~~~~~~~~~ 836 837- ``checkdep_dvipng`` 838- ``checkdep_ghostscript`` 839- ``checkdep_pdftops`` 840- ``checkdep_inkscape`` 841 842 843- ``ticker.decade_up`` 844- ``ticker.decade_down`` 845 846 847- ``cbook.dedent`` 848- ``docstring.Appender`` 849- ``docstring.dedent`` 850- ``docstring.copy_dedent`` 851 852Use the standard library's docstring manipulation tools instead, such as 853`inspect.cleandoc` and `inspect.getdoc`. 854 855 856 857- ``matplotlib.scale.get_scale_docs()`` 858- ``matplotlib.pyplot.get_scale_docs()`` 859 860These are considered internal and will be removed from the public API in a 861future version. 862 863- ``projections.process_projection_requirements`` 864 865- ``backend_ps.PsBackendHelper`` 866- ``backend_ps.ps_backend_helper``, 867 868- ``cbook.iterable`` 869- ``cbook.get_label`` 870- ``cbook.safezip`` 871 Manually check the lengths of the inputs instead, or rely on NumPy to do it. 872- ``cbook.is_hashable`` 873 Use ``isinstance(..., collections.abc.Hashable)`` instead. 874 875- The ``.backend_bases.RendererBase.strip_math``. Use 876 `.cbook.strip_math` instead. 877 878Multiple internal functions that were exposed as part of the public API 879of `.mpl_toolkits.mplot3d` are deprecated, 880 881**mpl_toolkits.mplot3d.art3d** 882 883- ``mpl_toolkits.mplot3d.art3d.norm_angle`` 884- ``mpl_toolkits.mplot3d.art3d.norm_text_angle`` 885- ``mpl_toolkits.mplot3d.art3d.path_to_3d_segment`` 886- ``mpl_toolkits.mplot3d.art3d.paths_to_3d_segments`` 887- ``mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes`` 888- ``mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes`` 889- ``mpl_toolkits.mplot3d.art3d.get_patch_verts`` 890- ``mpl_toolkits.mplot3d.art3d.get_colors`` 891- ``mpl_toolkits.mplot3d.art3d.zalpha`` 892 893**mpl_toolkits.mplot3d.proj3d** 894 895- ``mpl_toolkits.mplot3d.proj3d.line2d`` 896- ``mpl_toolkits.mplot3d.proj3d.line2d_dist`` 897- ``mpl_toolkits.mplot3d.proj3d.line2d_seg_dist`` 898- ``mpl_toolkits.mplot3d.proj3d.mod`` 899- ``mpl_toolkits.mplot3d.proj3d.proj_transform_vec`` 900- ``mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip`` 901- ``mpl_toolkits.mplot3d.proj3d.vec_pad_ones`` 902- ``mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points`` 903 904If your project relies on these functions, consider vendoring them. 905 906 907Font Handling 908~~~~~~~~~~~~~ 909 910- ``backend_pdf.RendererPdf.afm_font_cache`` 911- ``backend_ps.RendererPS.afmfontd`` 912- ``font_manager.OSXInstalledFonts`` 913- ``.TextToPath.glyph_to_path`` (Instead call ``font.get_path()`` and manually 914 transform the path.) 915 916 917Date related functions 918~~~~~~~~~~~~~~~~~~~~~~ 919 920- ``dates.seconds()`` 921- ``dates.minutes()`` 922- ``dates.hours()`` 923- ``dates.weeks()`` 924- ``dates.strpdate2num`` 925- ``dates.bytespdate2num`` 926 927These are brittle in the presence of locale changes. Use standard datetime 928parsers such as `time.strptime` or `dateutil.parser.parse`, and additionally 929call `matplotlib.dates.date2num` if you need to convert to Matplotlib's 930internal datetime representation; or use ``dates.datestr2num``. 931 932Axes3D 933~~~~~~ 934 935- `.axes3d.Axes3D.w_xaxis` 936- `.axes3d.Axes3D.w_yaxis` 937- `.axes3d.Axes3D.w_zaxis` 938 939Use `.axes3d.Axes3D.xaxis`, `.axes3d.Axes3D.yaxis` and `.axes3d.Axes3D.zaxis` 940instead. 941 942Testing 943~~~~~~~ 944 945- ``matplotlib.testing.decorators.switch_backend`` decorator 946 947Test functions should use ``pytest.mark.backend``, and the mark will be 948picked up by the `matplotlib.testing.conftest.mpl_test_settings` fixture. 949 950Quiver 951~~~~~~ 952 953- ``.color`` attribute of `.Quiver` objects 954 955Instead, use (as for any `.Collection`) the ``get_facecolor`` method. 956Note that setting to the ``.color`` attribute did not update the quiver artist, 957whereas calling ``set_facecolor`` does. 958 959GUI / backend details 960~~~~~~~~~~~~~~~~~~~~~ 961 962- ``.get_py2exe_datafiles`` 963- ``.tk_window_focus`` 964- ``.backend_gtk3.FileChooserDialog`` 965- ``.backend_gtk3.NavigationToolbar2GTK3.get_filechooser`` 966- ``.backend_gtk3.SaveFigureGTK3.get_filechooser`` 967- ``.NavigationToolbar2QT.adj_window`` attribute. This is unused and always ``None``. 968- ``.backend_wx.IDLE_DELAY`` global variable 969 This is unused and only relevant to the now removed wx "idling" code (note that 970 as it is a module-level global, no deprecation warning is emitted when 971 accessing it). 972- ``mlab.demean`` 973- ``backend_gtk3cairo.FigureCanvasGTK3Cairo``, 974- ``backend_wx.debug_on_error``, ``backend_wx.fake_stderr``, 975 ``backend_wx.raise_msg_to_str``, ``backend_wx.MenuButtonWx``, 976 ``backend_wx.PrintoutWx``, 977- ``matplotlib.backends.qt_editor.formlayout`` module 978 979This module is a vendored, modified version of the official formlayout_ module 980available on PyPI. Install that module separately if you need it. 981 982.. _formlayout: https://pypi.org/project/formlayout/ 983 984- ``GraphicsContextPS.shouldstroke`` 985 986 987Transforms / scales 988~~~~~~~~~~~~~~~~~~~ 989 990- ``LogTransformBase`` 991- ``Log10Transform`` 992- ``Log2Transform``, 993- ``NaturalLogTransformLog`` 994- ``InvertedLogTransformBase`` 995- ``InvertedLog10Transform`` 996- ``InvertedLog2Transform`` 997- ``InvertedNaturalLogTransform`` 998 999These classes defined in :mod:`matplotlib.scale` are deprecated. 1000As a replacement, use the general `~.scale.LogTransform` and `~.scale.InvertedLogTransform` 1001classes, whose constructors take a *base* argument. 1002 1003Locators / Formatters 1004~~~~~~~~~~~~~~~~~~~~~ 1005 1006- ``OldScalarFormatter.pprint_val`` 1007- ``ScalarFormatter.pprint_val`` 1008- ``LogFormatter.pprint_val`` 1009 1010These are helper methods that do not have a consistent signature across 1011formatter classes. 1012 1013Path tools 1014~~~~~~~~~~ 1015 1016- ``path.get_paths_extents`` 1017 1018Use `~.path.get_path_collection_extents` instead. 1019 1020- ``.Path.has_nonfinite`` attribute 1021 1022Use ``not np.isfinite(path.vertices).all()`` instead. 1023 1024- ``.bezier.find_r_to_boundary_of_closedpath`` function is deprecated 1025 1026This has always returned None instead of the requested radius. 1027 1028Text 1029~~~~ 1030 1031- ``text.TextWithDash`` 1032- ``Text.is_math_text`` 1033- ``TextPath.is_math_text`` 1034- ``TextPath.text_get_vertices_codes`` (As an alternative, construct a new ``TextPath`` object.) 1035 1036Unused attributes 1037~~~~~~~~~~~~~~~~~ 1038 1039- ``NavigationToolbar2QT.buttons`` 1040- ``Line2D.verticalOffset`` 1041- ``Quiver.keytext`` 1042- ``Quiver.keyvec`` 1043- ``SpanSelector.buttonDown`` 1044 1045These are unused and never updated. 1046 1047 1048Sphinx extensions 1049~~~~~~~~~~~~~~~~~ 1050 1051- ``matplotlib.sphinxext.mathmpl.math_directive`` 1052- ``matplotlib.sphinxext.plot_directive.plot_directive`` 1053 1054This is because the ``matplotlib.sphinxext.mathmpl`` and 1055``matplotlib.sphinxext.plot_directive`` interfaces have changed from the 1056(Sphinx-)deprecated function-based interface to a class-based interface; this 1057should not affect end users. 1058 1059- ``mpl_toolkits.axisartist.axis_artist.UnimplementedException`` 1060 1061Environmental Variables 1062~~~~~~~~~~~~~~~~~~~~~~~ 1063 1064- The ``MATPLOTLIBDATA`` environment variable 1065 1066 1067Axis 1068~~~~ 1069 1070- ``Axis.iter_ticks`` 1071 1072This only served as a helper to the private `.Axis._update_ticks` 1073 1074 1075Undeprecations 1076-------------- 1077The following API elements have been un-deprecated: 1078 1079- The *obj_type* keyword argument to the 1080 ``matplotlib.cbook.deprecation.deprecated`` decorator. 1081- *xmin*, *xmax* keyword arguments to `.Axes.set_xlim` and *ymin*, *ymax* 1082 keyword arguments to `.Axes.set_ylim` 1083 1084 1085New features 1086------------ 1087 1088`.Text` now has a ``c`` alias for the ``color`` property 1089~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1090For consistency with `.Line2D`, the `~.text.Text` class has gained the ``c`` 1091alias for the ``color`` property. For example, one can now write :: 1092 1093 ax.text(.5, .5, "foo", c="red") 1094 1095 1096``Cn`` colors now support ``n>=10`` 1097~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1098It is now possible to go beyond the tenth color in the property cycle using 1099``Cn`` syntax, e.g. :: 1100 1101 plt.plot([1, 2], color="C11") 1102 1103now uses the 12th color in the cycle. 1104 1105Note that previously, a construct such as:: 1106 1107 plt.plot([1, 2], "C11") 1108 1109would be interpreted as a request to use color ``C1`` and marker ``1`` 1110(an "inverted Y"). To obtain such a plot, one should now use :: 1111 1112 plt.plot([1, 2], "1C1") 1113 1114(so that the first "1" gets correctly interpreted as a marker 1115specification), or, more explicitly:: 1116 1117 plt.plot([1, 2], marker="1", color="C1") 1118 1119 1120New `.Formatter.format_ticks` method 1121~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1122The `.Formatter` class gained a new `~.Formatter.format_ticks` method, which 1123takes the list of all tick locations as a single argument and returns the list 1124of all formatted values. It is called by the axis tick handling code and, by 1125default, first calls `~.Formatter.set_locs` with all locations, then repeatedly 1126calls `~.Formatter.__call__` for each location. 1127 1128Tick-handling code in the codebase that previously performed this sequence 1129(`~.Formatter.set_locs` followed by repeated `~.Formatter.__call__`) have been 1130updated to use `~.Formatter.format_ticks`. 1131 1132`~.Formatter.format_ticks` is intended to be overridden by `.Formatter` 1133subclasses for which the formatting of a tick value depends on other tick 1134values, such as `.ConciseDateFormatter`. 1135 1136Added support for RGB(A) images in pcolorfast 1137~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 1139pcolorfast now accepts 3D images (RGB or RGBA) arrays if the X and Y 1140specifications allow image or pcolorimage rendering; they remain unsupported by 1141the more general quadmesh rendering 1142 1143 1144Invalid inputs 1145-------------- 1146 1147Passing invalid locations to `~.Axes.legend` and `~.Axes.table` used 1148to fallback on a default location. This behavior is deprecated and 1149will throw an exception in a future version. 1150 1151`.offsetbox.AnchoredText` is unable to handle the *horizontalalignment* or 1152*verticalalignment* kwargs, and used to ignore them with a warning. This 1153behavior is deprecated and will throw an exception in a future version. 1154 1155Passing steps less than 1 or greater than 10 to `~.ticker.MaxNLocator` used to 1156result in undefined behavior. It now throws a `ValueError`. 1157 1158The signature of the (private) ``Axis._update_ticks`` has been changed to not 1159take the renderer as argument anymore (that argument is unused). 1160