diff --git a/doc/users/prev_whats_new/whats_new_3.0.rst b/doc/users/prev_whats_new/whats_new_3.0.rst index 870f33bb0d5f..f5f530326322 100644 --- a/doc/users/prev_whats_new/whats_new_3.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.0.rst @@ -10,8 +10,8 @@ The default backend no longer must be set as part of the build process. Instead, at run time, the builtin backends are tried in sequence until one of them imports. -Headless linux servers (identified by the DISPLAY env not being defined) -will not select a GUI backend. +Headless Linux servers (identified by the DISPLAY environment variable not +being defined) will not select a GUI backend. Cyclic colormaps ---------------- @@ -53,29 +53,28 @@ be rotated and the color can be changed. By default the labels and arrows have the same color, but the class may also pass arguments for customizing arrow and text layout, these are passed to :class:`matplotlib.textpath.TextPath` and `matplotlib.patches.FancyArrowPatch`. Location, length and width for both -arrow tail and head can be adjusted, the the direction arrows and labels can -have a frame. Padding and separation parameters can be adjusted. +arrow tail and head can be adjusted, the direction arrows and labels can have a +frame. Padding and separation parameters can be adjusted. Add ``minorticks_on()/off()`` methods for colorbar -------------------------------------------------- -A new method :meth:`.colorbar.Colobar.minorticks_on` has been added -to correctly display minor ticks on a colorbar. This method -doesn't allow the minor ticks to extend into the regions beyond vmin and vmax -when the *extend* kwarg (used while creating the colorbar) is set to 'both', -'max' or 'min'. -A complementary method :meth:`.colorbar.Colobar.minorticks_off` -has also been added to remove the minor ticks on the colorbar. +A new method :meth:`.colorbar.Colobar.minorticks_on` has been added to +correctly display minor ticks on a colorbar. This method doesn't allow the +minor ticks to extend into the regions beyond vmin and vmax when the *extend* +keyword argument (used while creating the colorbar) is set to 'both', 'max' or +'min'. A complementary method :meth:`.colorbar.Colobar.minorticks_off` has +also been added to remove the minor ticks on the colorbar. Colorbar ticks can now be automatic ----------------------------------- The number of ticks placed on colorbars was previously appropriate for a large -colorbar, but looked bad if the colorbar was made smaller (i.e. via the ``shrink`` kwarg). -This has been changed so that the number of ticks is now responsive to how -large the colorbar is. +colorbar, but looked bad if the colorbar was made smaller (i.e. via the +*shrink* keyword argument). This has been changed so that the number of ticks +is now responsive to how large the colorbar is. @@ -94,14 +93,14 @@ overwriting, especially when the figure name has been manually set using `.figure.Figure.canvas.set_window_title()`. -Legend now has a *title_fontsize* kwarg (and rcParam) ------------------------------------------------------ +Legend now has a *title_fontsize* keyword argument (and rcParam) +---------------------------------------------------------------- -The title for a `.Figure.legend` and `.Axes.legend` can now have its -fontsize set via the ``title_fontsize`` kwarg. There is also a new -:rc:`legend.title_fontsize`. Both default to ``None``, which means -the legend title will have the same fontsize as the axes default fontsize -(*not* the legend fontsize, set by the ``fontsize`` kwarg or +The title for a `.Figure.legend` and `.Axes.legend` can now have its font size +set via the *title_fontsize* keyword argument. There is also a new +:rc:`legend.title_fontsize`. Both default to ``None``, which means the legend +title will have the same font size as the axes default font size (*not* the +legend font size, set by the *fontsize* keyword argument or :rc:`legend.fontsize`). @@ -113,10 +112,10 @@ of the attribute `axes.prop_cycle` with cyclers using the `markevery` Line2D object property. An example of this feature is provided at :doc:`/gallery/lines_bars_and_markers/markevery_prop_cycle`. -Multipage PDF support for pgf backend -------------------------------------- +Multi-page PDF support for pgf backend +-------------------------------------- -The pgf backend now also supports multipage PDF files. +The pgf backend now also supports multi-page PDF files. .. code-block:: python @@ -228,4 +227,4 @@ Sphinx 1.8 provides by default. (``:mathmpl:`` uses Matplotlib to render math expressions to images embedded in html, whereas Sphinx uses MathJax.) When using Sphinx<1.8, both names (``:math:`` and ``:mathmpl:``) remain -available for backcompatibility. +available for backwards-compatibility. diff --git a/doc/users/prev_whats_new/whats_new_3.1.0.rst b/doc/users/prev_whats_new/whats_new_3.1.0.rst index 2c5f2fd45023..c55191af10c2 100644 --- a/doc/users/prev_whats_new/whats_new_3.1.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.1.0.rst @@ -175,12 +175,11 @@ changed. `.ConnectionPatch` accepts arbitrary transforms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Alternatively to strings like ``"data"`` or ``"axes fraction"`` -`ConnectionPatch` now accepts any `~matplotlib.transforms.Transform` -as input for the ``coordsA`` and ``coordsB`` argument. This allows to -draw lines between points defined in different user defined coordinate -systems. Also see the :doc:`Connect Simple01 example -`. +Alternatively to strings like ``"data"`` or ``"axes fraction"``, +`ConnectionPatch` now accepts any `~matplotlib.transforms.Transform` as input +for the *coordsA* and *coordsB* arguments. This allows to draw lines between +points defined in different user defined coordinate systems. Also see the +:doc:`Connect Simple01 example `. mplot3d Line3D now allows {set,get}_data_3d @@ -244,11 +243,10 @@ The `.Axis.get_inverted` and `.Axis.set_inverted` methods query and set whether the axis uses "inverted" orientation (i.e. increasing to the left for the x-axis and to the bottom for the y-axis). -They perform tasks similar to `.Axes.xaxis_inverted`, -`.Axes.yaxis_inverted`, `.Axes.invert_xaxis`, and -`.Axes.invert_yaxis`, with the specific difference that -`.Axes..set_inverted` makes it easier to set the invertedness of an -axis regardless of whether it had previously been inverted before. +They perform tasks similar to `.Axes.xaxis_inverted`, `.Axes.yaxis_inverted`, +`.Axes.invert_xaxis`, and `.Axes.invert_yaxis`, with the specific difference +that `.Axis.set_inverted` makes it easier to set the inversion of an axis +regardless of whether it had previously been inverted before. Adjust default minor tick spacing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -260,18 +258,17 @@ Default minor tick spacing was changed from 0.625 to 0.5 for major ticks spaced `.EngFormatter` now accepts *usetex*, *useMathText* as keyword only arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -A public API has been added to `.EngFormatter` to control how the -numbers in the ticklabels will be rendered. By default, -``useMathText`` evaluates to -:rc:`axes.formatter.use_mathtext'` and ``usetex`` evaluates -to :rc:`'text.usetex'`. +A public API has been added to `.EngFormatter` to control how the numbers in +the ticklabels will be rendered. By default, *useMathText* evaluates to +:rc:`axes.formatter.use_mathtext'` and *usetex* evaluates to +:rc:`'text.usetex'`. If either is `True` then the numbers will be encapsulated by ``$`` signs. When using ``TeX`` this implies that the numbers will be shown in TeX's math font. When using mathtext, the ``$`` signs around -numbers will ensure unicode rendering (as implied by mathtext). This +numbers will ensure Unicode rendering (as implied by mathtext). This will make sure that the minus signs in the ticks are rendered as the -unicode=minus (U+2212) when using mathtext (without relying on the +Unicode minus (U+2212) when using mathtext (without relying on the `~.Formatter.fix_minus` method). @@ -311,9 +308,9 @@ caching; thereby, this new argument provides a fix for issue Endless Looping GIFs with PillowWriter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -We acknowledge that most people want to watch a gif more than -once. Saving an animation as a gif with PillowWriter now produces an -endless looping gif. +We acknowledge that most people want to watch a GIF more than +once. Saving an animation as a GIF with PillowWriter now produces an +endless looping GIF. Adjusted `.matplotlib.widgets.Slider` to have vertical orientation diff --git a/doc/users/prev_whats_new/whats_new_3.2.0.rst b/doc/users/prev_whats_new/whats_new_3.2.0.rst index 2bf2cc452545..0e6c9a867898 100644 --- a/doc/users/prev_whats_new/whats_new_3.2.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.2.0.rst @@ -89,9 +89,9 @@ parameter. Shifting errorbars ------------------ -Previously, `~.Axes.errorbar()` accepted a kwarg *errorevery* such that the -command ``plt.errorbar(x, y, yerr, errorevery=6)`` would add error bars to -datapoints ``x[::6], y[::6]``. +Previously, `~.Axes.errorbar()` accepted a keyword argument *errorevery* such +that the command ``plt.errorbar(x, y, yerr, errorevery=6)`` would add error +bars to datapoints ``x[::6], y[::6]``. `~.Axes.errorbar()` now also accepts a tuple for *errorevery* such that ``plt.errorbar(x, y, yerr, errorevery=(start, N))`` adds error bars to points diff --git a/doc/users/prev_whats_new/whats_new_3.3.0.rst b/doc/users/prev_whats_new/whats_new_3.3.0.rst index 74c5666f2812..78cb108bba3e 100644 --- a/doc/users/prev_whats_new/whats_new_3.3.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.3.0.rst @@ -125,7 +125,7 @@ Note that they may *not* be used to share axes after any operation (e.g., drawing) has occurred on them. -Align labels to axes edges +Align labels to Axes edges -------------------------- `~.axes.Axes.set_xlabel`, `~.axes.Axes.set_ylabel` and `.ColorbarBase.set_label` @@ -138,15 +138,14 @@ takes the rcParam based on its orientation. New "extend" keyword to colors.BoundaryNorm ------------------------------------------- -`~.colors.BoundaryNorm` now has an ``extend`` keyword argument, analogous to -``extend`` in `~.axes.Axes.contourf`. When set to 'both', 'min', or 'max', -it maps the corresponding out-of-range values to `~.colors.Colormap` -lookup-table indices near the appropriate ends of their range so that the -colors for out-of range values are adjacent to, but distinct from, their -in-range neighbors. The colorbar inherits the ``extend`` argument from the -norm, so with ``extend='both'``, for example, the colorbar will have triangular -extensions for out-of-range values with colors that differ from adjacent in-range -colors. +`~.colors.BoundaryNorm` now has an *extend* keyword argument, analogous to +*extend* in `~.axes.Axes.contourf`. When set to 'both', 'min', or 'max', it +maps the corresponding out-of-range values to `~.colors.Colormap` lookup-table +indices near the appropriate ends of their range so that the colors for out-of +range values are adjacent to, but distinct from, their in-range neighbors. The +colorbar inherits the *extend* argument from the norm, so with +``extend='both'``, for example, the colorbar will have triangular extensions +for out-of-range values with colors that differ from adjacent in-range colors. .. plot:: @@ -217,15 +216,15 @@ raising the plot window when calling `~.pyplot.show` or `~.pyplot.pause`. -Imshow now coerces 3D arrays with depth 1 to 2D ------------------------------------------------- +``imshow`` now coerces 3D arrays with depth 1 to 2D +--------------------------------------------------- Starting from this version arrays of size MxNx1 will be coerced into MxN for displaying. This means commands like ``plt.imshow(np.random.rand(3, 3, 1))`` will no longer return an error message that the image shape is invalid. -``Axes3D`` no longer distorts the 3d plot to match the 2d aspect ratio +``Axes3D`` no longer distorts the 3D plot to match the 2D aspect ratio ---------------------------------------------------------------------- Plots made with :class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` were previously @@ -251,12 +250,12 @@ Home/Forward/Backward buttons now work with 3D axes -``savefig()`` gained a ``backend`` keyword argument ---------------------------------------------------- +``savefig()`` gained a *backend* keyword argument +------------------------------------------------- -The ``backend`` keyword argument to ``savefig`` can now be used to pick the +The *backend* keyword argument to ``savefig`` can now be used to pick the rendering backend without having to globally set the backend; e.g. one can save -pdfs using the pgf backend with ``savefig("file.pdf", backend="pgf")``. +PDFs using the pgf backend with ``savefig("file.pdf", backend="pgf")``. Offset text is now set to the top when using ``axis.tick_top()`` @@ -274,11 +273,11 @@ dropping the last row and column of *C*, and *x* and *y* are regarded as the edges of the remaining rows and columns in *C*. However, many users want *x* and *y* centered on the rows and columns of *C*. -To accommodate this, ``shading='nearest'`` and ``shading='auto'`` are -new allowed strings for the ``shading`` kwarg. ``'nearest'`` will center the -color on *x* and *y* if *x* and *y* have the same dimensions as *C* -(otherwise an error will be thrown). ``shading='auto'`` will choose 'flat' -or 'nearest' based on the size of *X*, *Y*, *C*. +To accommodate this, ``shading='nearest'`` and ``shading='auto'`` are new +allowed strings for the *shading* keyword argument. ``'nearest'`` will center +the color on *x* and *y* if *x* and *y* have the same dimensions as *C* +(otherwise an error will be thrown). ``shading='auto'`` will choose 'flat' or +'nearest' based on the size of *X*, *Y*, *C*. If ``shading='flat'`` then *X*, and *Y* should have dimensions one larger than *C*. If *X* and *Y* have the same dimensions as *C*, then the previous @@ -296,20 +295,20 @@ for examples. Set zorder of contour labels ---------------------------- -`~.axes.Axes.clabel` now accepts a *zorder* kwarg -making it easier to set the *zorder* of contour labels. -If not specified, the default *zorder* of clabels used to always be 3 -(i.e. the default *zorder* of `~.text.Text`) irrespective of the *zorder* -passed to `~.axes.Axes.contour`/`~.axes.Axes.contourf`. -The new default *zorder* for clabels has been changed to (``2 + zorder`` -passed to `~.axes.Axes.contour` / `~.axes.Axes.contourf`). +`~.axes.Axes.clabel` now accepts a *zorder* keyword argument making it easier +to set the *zorder* of contour labels. If not specified, the default *zorder* +of clabels used to always be 3 (i.e. the default *zorder* of `~.text.Text`) +irrespective of the *zorder* passed to +`~.axes.Axes.contour`/`~.axes.Axes.contourf`. The new default *zorder* for +clabels has been changed to (``2 + zorder`` passed to `~.axes.Axes.contour` / +`~.axes.Axes.contourf`). Simple syntax to select fonts by absolute path ---------------------------------------------- Fonts can now be selected by passing an absolute `pathlib.Path` to the *font* -kwarg of `.Text`. +keyword argument of `.Text`. Add generalized "mathtext.fallback" rcParam @@ -397,8 +396,8 @@ conversion (using the new epoch) is:: -`~.axes.Axes.set_title` gains a y keyword argument to control auto positioning ------------------------------------------------------------------------------- +`~.axes.Axes.set_title` gains a *y* keyword argument to control auto positioning +-------------------------------------------------------------------------------- `~.axes.Axes.set_title` tries to auto-position the title to avoid any decorators on the top x-axis. This is not always desirable so now @@ -416,10 +415,10 @@ Add :rc:`contour.linewidth` to rcParams --------------------------------------- The new config option :rc:`contour.linewidth` allows to control the default -linewidth of contours as a float. When set to ``None``, the linewidths fall -back to :rc:`lines.linewidth`. The config value is overidden as usual -by the ``linewidths`` argument passed to `~.axes.Axes.contour` when -it is not set to ``None``. +line width of contours as a float. When set to ``None``, the line widths fall +back to :rc:`lines.linewidth`. The config value is overridden as usual by the +*linewidths* argument passed to `~.axes.Axes.contour` when it is not set to +``None``. The SVG backend can now render hatches with transparency