Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1aec49b

Browse filesBrowse files
authored
Merge pull request #15176 from dstansby/whats-new-320
What's new for 3.2.0
2 parents a368170 + 735e7fe commit 1aec49b
Copy full SHA for 1aec49b
Expand file treeCollapse file tree

13 files changed

+124
-107
lines changed

‎doc/users/next_whats_new/2019-02-27-AL.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/2019-02-27-AL.rst
-5Lines changed: 0 additions & 5 deletions
This file was deleted.

‎doc/users/next_whats_new/2019-04-05-AL.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/2019-04-05-AL.rst
-4Lines changed: 0 additions & 4 deletions
This file was deleted.

‎doc/users/next_whats_new/2019-04-17-AL.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/2019-04-17-AL.rst
-12Lines changed: 0 additions & 12 deletions
This file was deleted.

‎doc/users/next_whats_new/2019-05-31-AL.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/2019-05-31-AL.rst
-4Lines changed: 0 additions & 4 deletions
This file was deleted.

‎doc/users/next_whats_new/2019-06-05-pdf-gouraud-alpha.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/2019-06-05-pdf-gouraud-alpha.rst
-5Lines changed: 0 additions & 5 deletions
This file was deleted.

‎doc/users/next_whats_new/2019-08-14-ES.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/2019-08-14-ES.rst
-33Lines changed: 0 additions & 33 deletions
This file was deleted.

‎doc/users/next_whats_new/bar3d_lightsource.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/bar3d_lightsource.rst
-5Lines changed: 0 additions & 5 deletions
This file was deleted.

‎doc/users/next_whats_new/errorbar_offsets.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/errorbar_offsets.rst
-10Lines changed: 0 additions & 10 deletions
This file was deleted.

‎doc/users/next_whats_new/logit_scale_stuff.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/logit_scale_stuff.rst
-13Lines changed: 0 additions & 13 deletions
This file was deleted.

‎doc/users/next_whats_new/rcparam-axes-title-location-color.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/rcparam-axes-title-location-color.rst
-9Lines changed: 0 additions & 9 deletions
This file was deleted.

‎doc/users/next_whats_new/shorthand_hex_colors.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/shorthand_hex_colors.rst
-6Lines changed: 0 additions & 6 deletions
This file was deleted.
+123Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
2+
What's new in Matplotlib 3.2
3+
============================
4+
5+
For a list of all of the issues and pull requests since the last
6+
revision, see the :ref:`github-stats`.
7+
8+
.. contents:: Table of Contents
9+
:depth: 4
10+
11+
.. toctree::
12+
:maxdepth: 4
13+
14+
15+
Unit converters and subclasses
16+
------------------------------
17+
Unit converters now also handle instances of subclasses of the class they have
18+
been registered for.
19+
20+
`~pyplot.imsave` metadata and PIL options
21+
-----------------------------------------
22+
`~pyplot.imsave` has gained support for the ``metadata`` and ``pil_kwargs``
23+
parameters. These parameters behave similarly as for the `Figure.savefig()`
24+
method.
25+
26+
`cbook.normalize_kwargs`
27+
------------------------
28+
`cbook.normalize_kwargs` now presents a convenient interface to normalize
29+
artist properties (e.g., from "lw" to "linewidth"):
30+
31+
>>> cbook.normalize_kwargs({"lw": 1}, Line2D)
32+
{"linewidth": 1}
33+
34+
The first argument is the mapping to be normalized, and the second argument can
35+
be an artist class or an artist instance (it can also be a mapping in a
36+
specific format; see the function's docstring for details).
37+
38+
`FontProperties` and `os.PathLike`
39+
----------------------------------
40+
The *fname* argument to `FontProperties` can now be an `os.PathLike`\s
41+
e.g. ``FontProperties(fname=pathlib.Path("/path/to/font.ttf"))``.
42+
43+
Gouraud-shading alpha channel in PDF backend
44+
--------------------------------------------
45+
The pdf backend now supports an alpha channel in Gouraud-shaded
46+
triangle meshes.
47+
48+
Kerning adjustments now use correct values
49+
------------------------------------------
50+
Due to an error in how kerning adjustments were applied, previous versions of
51+
Matplotlib would under-correct kerning. This version will now correctly apply
52+
kerning (for fonts supported by FreeType). To restore the old behavior (e.g.,
53+
for test images), you may set :rc:`text.kerning_factor` to 6 (instead of 0).
54+
Other values have undefined behavior.
55+
56+
.. plot::
57+
58+
import matplotlib.pyplot as plt
59+
60+
# Use old kerning values:
61+
plt.rcParams['text.kerning_factor'] = 6
62+
fig, ax = plt.subplots()
63+
ax.text(0.0, 0.05, 'BRAVO\nAWKWARD\nVAT\nW.Test', fontsize=56)
64+
ax.set_title('Before (text.kerning_factor = 6)')
65+
66+
Note how the spacing between characters is uniform between their bounding boxes
67+
(above). With corrected kerning (below), slanted characters (e.g., AV or VA)
68+
will be spaced closer together, as well as various other character pairs,
69+
depending on font support (e.g., T and e, or the period after the W).
70+
71+
.. plot::
72+
73+
import matplotlib.pyplot as plt
74+
75+
# Use new kerning values:
76+
plt.rcParams['text.kerning_factor'] = 0
77+
fig, ax = plt.subplots()
78+
ax.text(0.0, 0.05, 'BRAVO\nAWKWARD\nVAT\nW.Test', fontsize=56)
79+
ax.set_title('After (text.kerning_factor = 0)')
80+
81+
82+
bar3d lightsource shading
83+
-------------------------
84+
bar3d now supports lighting from different angles when the *shade* parameter is
85+
True, which can be configured using the ``lightsource`` parameter.
86+
87+
Shifting errorbars
88+
------------------
89+
Previously, `plt.errorbar()` accepted a kwarg `errorevery` such that the
90+
command `plt.errorbar(x, y, yerr, errorevery=6)` would add error bars to
91+
datapoints `x[::6], y[::6]`.
92+
93+
`errorbar()` now also accepts a tuple for `errorevery` such that
94+
`plt.errorbar(x, y, yerr, errorevery=(start, N))` adds error bars to points
95+
`x[start::N], y[start::N]`.
96+
97+
Improvements in Logit scale ticker and formatter
98+
------------------------------------------------
99+
Introduced in version 1.5, the logit scale didn't have an appropriate ticker and
100+
formatter. Previously, the location of ticks was not zoom dependent, too many labels
101+
were displayed causing overlapping which broke readability, and label formatting
102+
did not adapt to precision.
103+
104+
Starting from this version, the logit locator has nearly the same behavior as the
105+
locator for the log scale or the linear
106+
scale, depending on used zoom. The number of ticks is controlled. Some minor
107+
labels are displayed adaptively as sublabels in log scale. Formatting is adapted
108+
for probabilities and the precision adapts to the scale.
109+
110+
rcParams for axes title location and color
111+
------------------------------------------
112+
Two new rcParams have been added: ``axes.titlelocation`` denotes the default axes title
113+
alignment, and ``axes.titlecolor`` the default axes title color.
114+
115+
Valid values for ``axes.titlelocation`` are: left, center, and right.
116+
Valid values for ``axes.titlecolor`` are: auto or a color. Setting it to auto
117+
will fall back to previous behaviour, which is using the color in ``text.color``.
118+
119+
3-digit and 4-digit hex colors
120+
------------------------------
121+
Colors can now be specified using 3-digit or 4-digit hex colors, shorthand for
122+
the colors obtained by duplicating each character, e.g. ``#123`` is equivalent to
123+
``#112233`` and ``#123a`` is equivalent to ``#112233aa``.

‎doc/users/whats_new.rst

Copy file name to clipboardExpand all lines: doc/users/whats_new.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ Whats New
2525

2626
next_whats_new/*
2727

28-
.. include:: prev_whats_new/whats_new_3.1.0.rst
28+
.. include:: prev_whats_new/whats_new_3.2.0.rst

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.