Skip to content

Commit c4a46b8

Browse files
authored
Merge pull request #17654 from QuLogic/whatsnew
Small fixes to recent What's New
2 parents 31e26cc + 5ae1413 commit c4a46b8

File tree

4 files changed

+80
-85
lines changed

4 files changed

+80
-85
lines changed

doc/users/prev_whats_new/whats_new_3.0.rst

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ The default backend no longer must be set as part of the build
1010
process. Instead, at run time, the builtin backends are tried in
1111
sequence until one of them imports.
1212

13-
Headless linux servers (identified by the DISPLAY env not being defined)
14-
will not select a GUI backend.
13+
Headless Linux servers (identified by the DISPLAY environment variable not
14+
being defined) will not select a GUI backend.
1515

1616
Cyclic colormaps
1717
----------------
@@ -53,29 +53,28 @@ be rotated and the color can be changed. By default the labels and arrows have
5353
the same color, but the class may also pass arguments for customizing arrow
5454
and text layout, these are passed to :class:`matplotlib.textpath.TextPath` and
5555
`matplotlib.patches.FancyArrowPatch`. Location, length and width for both
56-
arrow tail and head can be adjusted, the the direction arrows and labels can
57-
have a frame. Padding and separation parameters can be adjusted.
56+
arrow tail and head can be adjusted, the direction arrows and labels can have a
57+
frame. Padding and separation parameters can be adjusted.
5858

5959

6060
Add ``minorticks_on()/off()`` methods for colorbar
6161
--------------------------------------------------
6262

63-
A new method :meth:`.colorbar.Colobar.minorticks_on` has been added
64-
to correctly display minor ticks on a colorbar. This method
65-
doesn't allow the minor ticks to extend into the regions beyond vmin and vmax
66-
when the *extend* kwarg (used while creating the colorbar) is set to 'both',
67-
'max' or 'min'.
68-
A complementary method :meth:`.colorbar.Colobar.minorticks_off`
69-
has also been added to remove the minor ticks on the colorbar.
63+
A new method :meth:`.colorbar.Colobar.minorticks_on` has been added to
64+
correctly display minor ticks on a colorbar. This method doesn't allow the
65+
minor ticks to extend into the regions beyond vmin and vmax when the *extend*
66+
keyword argument (used while creating the colorbar) is set to 'both', 'max' or
67+
'min'. A complementary method :meth:`.colorbar.Colobar.minorticks_off` has
68+
also been added to remove the minor ticks on the colorbar.
7069

7170

7271
Colorbar ticks can now be automatic
7372
-----------------------------------
7473

7574
The number of ticks placed on colorbars was previously appropriate for a large
76-
colorbar, but looked bad if the colorbar was made smaller (i.e. via the ``shrink`` kwarg).
77-
This has been changed so that the number of ticks is now responsive to how
78-
large the colorbar is.
75+
colorbar, but looked bad if the colorbar was made smaller (i.e. via the
76+
*shrink* keyword argument). This has been changed so that the number of ticks
77+
is now responsive to how large the colorbar is.
7978

8079

8180

@@ -94,14 +93,14 @@ overwriting, especially when the figure name has been
9493
manually set using `.figure.Figure.canvas.set_window_title()`.
9594

9695

97-
Legend now has a *title_fontsize* kwarg (and rcParam)
98-
-----------------------------------------------------
96+
Legend now has a *title_fontsize* keyword argument (and rcParam)
97+
----------------------------------------------------------------
9998

100-
The title for a `.Figure.legend` and `.Axes.legend` can now have its
101-
fontsize set via the ``title_fontsize`` kwarg. There is also a new
102-
:rc:`legend.title_fontsize`. Both default to ``None``, which means
103-
the legend title will have the same fontsize as the axes default fontsize
104-
(*not* the legend fontsize, set by the ``fontsize`` kwarg or
99+
The title for a `.Figure.legend` and `.Axes.legend` can now have its font size
100+
set via the *title_fontsize* keyword argument. There is also a new
101+
:rc:`legend.title_fontsize`. Both default to ``None``, which means the legend
102+
title will have the same font size as the axes default font size (*not* the
103+
legend font size, set by the *fontsize* keyword argument or
105104
:rc:`legend.fontsize`).
106105

107106

@@ -113,10 +112,10 @@ of the attribute `axes.prop_cycle` with cyclers using the `markevery`
113112
Line2D object property. An example of this feature is provided at
114113
:doc:`/gallery/lines_bars_and_markers/markevery_prop_cycle`.
115114

116-
Multipage PDF support for pgf backend
117-
-------------------------------------
115+
Multi-page PDF support for pgf backend
116+
--------------------------------------
118117

119-
The pgf backend now also supports multipage PDF files.
118+
The pgf backend now also supports multi-page PDF files.
120119

121120
.. code-block:: python
122121
@@ -228,4 +227,4 @@ Sphinx 1.8 provides by default. (``:mathmpl:`` uses Matplotlib to render math
228227
expressions to images embedded in html, whereas Sphinx uses MathJax.)
229228

230229
When using Sphinx<1.8, both names (``:math:`` and ``:mathmpl:``) remain
231-
available for backcompatibility.
230+
available for backwards-compatibility.

doc/users/prev_whats_new/whats_new_3.1.0.rst

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,11 @@ changed.
175175
`.ConnectionPatch` accepts arbitrary transforms
176176
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177177

178-
Alternatively to strings like ``"data"`` or ``"axes fraction"``
179-
`ConnectionPatch` now accepts any `~matplotlib.transforms.Transform`
180-
as input for the ``coordsA`` and ``coordsB`` argument. This allows to
181-
draw lines between points defined in different user defined coordinate
182-
systems. Also see the :doc:`Connect Simple01 example
183-
</gallery/userdemo/connect_simple01>`.
178+
Alternatively to strings like ``"data"`` or ``"axes fraction"``,
179+
`ConnectionPatch` now accepts any `~matplotlib.transforms.Transform` as input
180+
for the *coordsA* and *coordsB* arguments. This allows to draw lines between
181+
points defined in different user defined coordinate systems. Also see the
182+
:doc:`Connect Simple01 example </gallery/userdemo/connect_simple01>`.
184183

185184

186185
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
244243
the axis uses "inverted" orientation (i.e. increasing to the left for the
245244
x-axis and to the bottom for the y-axis).
246245

247-
They perform tasks similar to `.Axes.xaxis_inverted`,
248-
`.Axes.yaxis_inverted`, `.Axes.invert_xaxis`, and
249-
`.Axes.invert_yaxis`, with the specific difference that
250-
`.Axes..set_inverted` makes it easier to set the invertedness of an
251-
axis regardless of whether it had previously been inverted before.
246+
They perform tasks similar to `.Axes.xaxis_inverted`, `.Axes.yaxis_inverted`,
247+
`.Axes.invert_xaxis`, and `.Axes.invert_yaxis`, with the specific difference
248+
that `.Axis.set_inverted` makes it easier to set the inversion of an axis
249+
regardless of whether it had previously been inverted before.
252250

253251
Adjust default minor tick spacing
254252
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -260,18 +258,17 @@ Default minor tick spacing was changed from 0.625 to 0.5 for major ticks spaced
260258
`.EngFormatter` now accepts *usetex*, *useMathText* as keyword only arguments
261259
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262260

263-
A public API has been added to `.EngFormatter` to control how the
264-
numbers in the ticklabels will be rendered. By default,
265-
``useMathText`` evaluates to
266-
:rc:`axes.formatter.use_mathtext'` and ``usetex`` evaluates
267-
to :rc:`'text.usetex'`.
261+
A public API has been added to `.EngFormatter` to control how the numbers in
262+
the ticklabels will be rendered. By default, *useMathText* evaluates to
263+
:rc:`axes.formatter.use_mathtext'` and *usetex* evaluates to
264+
:rc:`'text.usetex'`.
268265

269266
If either is `True` then the numbers will be encapsulated by ``$``
270267
signs. When using ``TeX`` this implies that the numbers will be shown
271268
in TeX's math font. When using mathtext, the ``$`` signs around
272-
numbers will ensure unicode rendering (as implied by mathtext). This
269+
numbers will ensure Unicode rendering (as implied by mathtext). This
273270
will make sure that the minus signs in the ticks are rendered as the
274-
unicode=minus (U+2212) when using mathtext (without relying on the
271+
Unicode minus (U+2212) when using mathtext (without relying on the
275272
`~.Formatter.fix_minus` method).
276273

277274

@@ -311,9 +308,9 @@ caching; thereby, this new argument provides a fix for issue
311308
Endless Looping GIFs with PillowWriter
312309
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
313310

314-
We acknowledge that most people want to watch a gif more than
315-
once. Saving an animation as a gif with PillowWriter now produces an
316-
endless looping gif.
311+
We acknowledge that most people want to watch a GIF more than
312+
once. Saving an animation as a GIF with PillowWriter now produces an
313+
endless looping GIF.
317314

318315

319316
Adjusted `.matplotlib.widgets.Slider` to have vertical orientation

doc/users/prev_whats_new/whats_new_3.2.0.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ parameter.
8989

9090
Shifting errorbars
9191
------------------
92-
Previously, `~.Axes.errorbar()` accepted a kwarg *errorevery* such that the
93-
command ``plt.errorbar(x, y, yerr, errorevery=6)`` would add error bars to
94-
datapoints ``x[::6], y[::6]``.
92+
Previously, `~.Axes.errorbar()` accepted a keyword argument *errorevery* such
93+
that the command ``plt.errorbar(x, y, yerr, errorevery=6)`` would add error
94+
bars to datapoints ``x[::6], y[::6]``.
9595

9696
`~.Axes.errorbar()` now also accepts a tuple for *errorevery* such that
9797
``plt.errorbar(x, y, yerr, errorevery=(start, N))`` adds error bars to points

doc/users/prev_whats_new/whats_new_3.3.0.rst

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Note that they may *not* be used to share axes after any operation (e.g.,
125125
drawing) has occurred on them.
126126

127127

128-
Align labels to axes edges
128+
Align labels to Axes edges
129129
--------------------------
130130

131131
`~.axes.Axes.set_xlabel`, `~.axes.Axes.set_ylabel` and `.ColorbarBase.set_label`
@@ -138,15 +138,14 @@ takes the rcParam based on its orientation.
138138
New "extend" keyword to colors.BoundaryNorm
139139
-------------------------------------------
140140

141-
`~.colors.BoundaryNorm` now has an ``extend`` keyword argument, analogous to
142-
``extend`` in `~.axes.Axes.contourf`. When set to 'both', 'min', or 'max',
143-
it maps the corresponding out-of-range values to `~.colors.Colormap`
144-
lookup-table indices near the appropriate ends of their range so that the
145-
colors for out-of range values are adjacent to, but distinct from, their
146-
in-range neighbors. The colorbar inherits the ``extend`` argument from the
147-
norm, so with ``extend='both'``, for example, the colorbar will have triangular
148-
extensions for out-of-range values with colors that differ from adjacent in-range
149-
colors.
141+
`~.colors.BoundaryNorm` now has an *extend* keyword argument, analogous to
142+
*extend* in `~.axes.Axes.contourf`. When set to 'both', 'min', or 'max', it
143+
maps the corresponding out-of-range values to `~.colors.Colormap` lookup-table
144+
indices near the appropriate ends of their range so that the colors for out-of
145+
range values are adjacent to, but distinct from, their in-range neighbors. The
146+
colorbar inherits the *extend* argument from the norm, so with
147+
``extend='both'``, for example, the colorbar will have triangular extensions
148+
for out-of-range values with colors that differ from adjacent in-range colors.
150149

151150
.. plot::
152151

@@ -217,15 +216,15 @@ raising the plot window when calling `~.pyplot.show` or `~.pyplot.pause`.
217216

218217

219218

220-
Imshow now coerces 3D arrays with depth 1 to 2D
221-
------------------------------------------------
219+
``imshow`` now coerces 3D arrays with depth 1 to 2D
220+
---------------------------------------------------
222221

223222
Starting from this version arrays of size MxNx1 will be coerced into MxN
224223
for displaying. This means commands like ``plt.imshow(np.random.rand(3, 3, 1))``
225224
will no longer return an error message that the image shape is invalid.
226225

227226

228-
``Axes3D`` no longer distorts the 3d plot to match the 2d aspect ratio
227+
``Axes3D`` no longer distorts the 3D plot to match the 2D aspect ratio
229228
----------------------------------------------------------------------
230229

231230
Plots made with :class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` were previously
@@ -251,12 +250,12 @@ Home/Forward/Backward buttons now work with 3D axes
251250

252251

253252

254-
``savefig()`` gained a ``backend`` keyword argument
255-
---------------------------------------------------
253+
``savefig()`` gained a *backend* keyword argument
254+
-------------------------------------------------
256255

257-
The ``backend`` keyword argument to ``savefig`` can now be used to pick the
256+
The *backend* keyword argument to ``savefig`` can now be used to pick the
258257
rendering backend without having to globally set the backend; e.g. one can save
259-
pdfs using the pgf backend with ``savefig("file.pdf", backend="pgf")``.
258+
PDFs using the pgf backend with ``savefig("file.pdf", backend="pgf")``.
260259

261260

262261
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
274273
edges of the remaining rows and columns in *C*. However, many users want
275274
*x* and *y* centered on the rows and columns of *C*.
276275

277-
To accommodate this, ``shading='nearest'`` and ``shading='auto'`` are
278-
new allowed strings for the ``shading`` kwarg. ``'nearest'`` will center the
279-
color on *x* and *y* if *x* and *y* have the same dimensions as *C*
280-
(otherwise an error will be thrown). ``shading='auto'`` will choose 'flat'
281-
or 'nearest' based on the size of *X*, *Y*, *C*.
276+
To accommodate this, ``shading='nearest'`` and ``shading='auto'`` are new
277+
allowed strings for the *shading* keyword argument. ``'nearest'`` will center
278+
the color on *x* and *y* if *x* and *y* have the same dimensions as *C*
279+
(otherwise an error will be thrown). ``shading='auto'`` will choose 'flat' or
280+
'nearest' based on the size of *X*, *Y*, *C*.
282281

283282
If ``shading='flat'`` then *X*, and *Y* should have dimensions one larger
284283
than *C*. If *X* and *Y* have the same dimensions as *C*, then the previous
@@ -296,20 +295,20 @@ for examples.
296295
Set zorder of contour labels
297296
----------------------------
298297

299-
`~.axes.Axes.clabel` now accepts a *zorder* kwarg
300-
making it easier to set the *zorder* of contour labels.
301-
If not specified, the default *zorder* of clabels used to always be 3
302-
(i.e. the default *zorder* of `~.text.Text`) irrespective of the *zorder*
303-
passed to `~.axes.Axes.contour`/`~.axes.Axes.contourf`.
304-
The new default *zorder* for clabels has been changed to (``2 + zorder``
305-
passed to `~.axes.Axes.contour` / `~.axes.Axes.contourf`).
298+
`~.axes.Axes.clabel` now accepts a *zorder* keyword argument making it easier
299+
to set the *zorder* of contour labels. If not specified, the default *zorder*
300+
of clabels used to always be 3 (i.e. the default *zorder* of `~.text.Text`)
301+
irrespective of the *zorder* passed to
302+
`~.axes.Axes.contour`/`~.axes.Axes.contourf`. The new default *zorder* for
303+
clabels has been changed to (``2 + zorder`` passed to `~.axes.Axes.contour` /
304+
`~.axes.Axes.contourf`).
306305

307306

308307
Simple syntax to select fonts by absolute path
309308
----------------------------------------------
310309

311310
Fonts can now be selected by passing an absolute `pathlib.Path` to the *font*
312-
kwarg of `.Text`.
311+
keyword argument of `.Text`.
313312

314313

315314
Add generalized "mathtext.fallback" rcParam
@@ -397,8 +396,8 @@ conversion (using the new epoch) is::
397396

398397

399398

400-
`~.axes.Axes.set_title` gains a y keyword argument to control auto positioning
401-
------------------------------------------------------------------------------
399+
`~.axes.Axes.set_title` gains a *y* keyword argument to control auto positioning
400+
--------------------------------------------------------------------------------
402401

403402
`~.axes.Axes.set_title` tries to auto-position the title to avoid any
404403
decorators on the top x-axis. This is not always desirable so now
@@ -416,10 +415,10 @@ Add :rc:`contour.linewidth` to rcParams
416415
---------------------------------------
417416

418417
The new config option :rc:`contour.linewidth` allows to control the default
419-
linewidth of contours as a float. When set to ``None``, the linewidths fall
420-
back to :rc:`lines.linewidth`. The config value is overidden as usual
421-
by the ``linewidths`` argument passed to `~.axes.Axes.contour` when
422-
it is not set to ``None``.
418+
line width of contours as a float. When set to ``None``, the line widths fall
419+
back to :rc:`lines.linewidth`. The config value is overridden as usual by the
420+
*linewidths* argument passed to `~.axes.Axes.contour` when it is not set to
421+
``None``.
423422

424423

425424
The SVG backend can now render hatches with transparency

0 commit comments

Comments
 (0)