1
1
.. _whats-new :
2
2
3
- ==========================
4
- What's new in Matplotlib
5
- ==========================
3
+ =============================
4
+ What's new in Matplotlib 3.0
5
+ =============================
6
6
7
7
For a list of all of the issues and pull requests since the last
8
8
revision, see the :ref: `github-stats `.
@@ -26,10 +26,14 @@ Ability to scale axis by a fixed order of magnitude
26
26
---------------------------------------------------
27
27
28
28
To scale an axis by a fixed order of magnitude, set the *scilimits * argument of
29
- `` Axes.ticklabel_format ` ` to the same (non-zero) lower and upper limits. Say to scale
30
- the y axis by a million (1e6), use `` ax.ticklabel_format(style='sci', scilimits=(6, 6), axis='y') ``.
29
+ `. Axes.ticklabel_format ` to the same (non-zero) lower and upper limits. Say to scale
30
+ the y axis by a million (1e6), use
31
31
32
- The behavior of ``scilimits=(0, 0) `` is unchanged. With this setting, matplotlib will adjust
32
+ .. code-block :: python
33
+
34
+ ax.ticklabel_format(style = ' sci' , scilimits = (6 , 6 ), axis = ' y' )
35
+
36
+ The behavior of ``scilimits=(0, 0) `` is unchanged. With this setting, Matplotlib will adjust
33
37
the order of magnitude depending on the axis values, rather than keeping it fixed. Previously, setting
34
38
``scilimits=(m, m) `` was equivalent to setting ``scilimits=(0, 0) ``.
35
39
@@ -39,12 +43,12 @@ Add ``AnchoredDirectionArrows`` feature to mpl_toolkits
39
43
40
44
A new mpl_toolkits class
41
45
:class: `~mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows `
42
- draws a pair of orthogonal arrows to inidcate directions on a 2D plot. A
46
+ draws a pair of orthogonal arrows to indicate directions on a 2D plot. A
43
47
minimal working example takes in the transformation object for the coordinate
44
48
system (typically ax.transAxes), and arrow labels. There are several optional
45
49
parameters that can be used to alter layout. For example, the arrow pairs can
46
50
be rotated and the color can be changed. By default the labels and arrows have
47
- the same color, but the class may also pass arguments for costumizing arrow
51
+ the same color, but the class may also pass arguments for customizing arrow
48
52
and text layout, these are passed to :class: `matplotlib.text.TextPath ` and
49
53
`matplotlib.patches.FancyArrowPatch `. Location, length and width for both
50
54
arrow tail and head can be adjusted, the the direction arrows and labels can
@@ -54,37 +58,37 @@ have a frame. Padding and separation parameters can be adjusted.
54
58
Add ``minorticks_on()/off() `` methods for colorbar
55
59
--------------------------------------------------
56
60
57
- A new method :meth: `.Colobar.minorticks_on ` is
58
- introduced to correctly display minor ticks on the colorbar. This method
61
+ A new method :meth: `.colorbar. Colobar.minorticks_on ` has been added
62
+ to correctly display minor ticks on a colorbar. This method
59
63
doesn't allow the minor ticks to extend into the regions beyond vmin and vmax
60
64
when the extend `kwarg ` (used while creating the colorbar) is set to 'both',
61
65
'max' or 'min'.
62
- A complementary method :meth: `.Colobar.minorticks_off `
63
- is introduced to remove the minor ticks on the colorbar.
66
+ A complementary method :meth: `.colorbar. Colobar.minorticks_off `
67
+ has also been added to remove the minor ticks on the colorbar.
64
68
65
69
66
70
Colorbar ticks can now be automatic
67
71
-----------------------------------
68
72
69
- The number of ticks on colorbars was appropriate for a large colorbar, but
70
- looked bad if the colorbar was made smaller (i.e. via the ``shrink `` kwarg).
73
+ The number of ticks placed on colorbars was previously appropriate for a large
74
+ colorbar, but looked bad if the colorbar was made smaller (i.e. via the ``shrink `` kwarg).
71
75
This has been changed so that the number of ticks is now responsive to how
72
76
large the colorbar is.
73
77
74
78
75
79
Cyclic colormaps
76
80
----------------
77
81
78
- Two new colormaps named 'twilight' and 'twilight_shifted' were added.
82
+ Two new colormaps named 'twilight' and 'twilight_shifted' have been added.
79
83
These colormaps start and end on the same color, and have two
80
84
symmetric halves with equal lightness, but diverging color. Since they
81
85
wrap around, they are a good choice for cyclic data such as phase
82
- angles, compass directions, or time of day. Like viridis, twilight is
86
+ angles, compass directions, or time of day. Like * viridis *, * twilight * is
83
87
perceptually uniform and colorblind friendly.
84
88
85
89
86
- Stop adding a suffix to suggest unique file name
87
- ------------------------------------------------
90
+ Don't automatically rename duplicate file names
91
+ -----------------------------------------------
88
92
89
93
Previously, when saving a figure to a file using the GUI's
90
94
save dialog box, if the default filename (based on the
@@ -95,11 +99,11 @@ behaviour has been removed. Now if the file name exists on
95
99
disk, the user is prompted whether or not to overwrite it.
96
100
This eliminates guesswork, and allows intentional
97
101
overwriting, especially when the figure name has been
98
- manually set using `fig .canvas.set_window_title() `.
102
+ manually set using `.figure.Figure .canvas.set_window_title() `.
99
103
100
104
101
- Legend now has a title_fontsize kwarg (and rcParam)
102
- ---------------------------------------------------
105
+ Legend now has a * title_fontsize * kwarg (and rcParam)
106
+ -----------------------------------------------------
103
107
104
108
The title for a `.Figure.legend ` and `.Axes.legend ` can now have its
105
109
fontsize set via the ``title_fontsize `` kwarg. There is also a new
@@ -109,13 +113,13 @@ the legend title will have the same fontsize as the axes default fontsize
109
113
:rc: `legend.fontsize `).
110
114
111
115
112
- Implemented support for axes.prop_cycle property markevery in rcParams
113
- ----------------------------------------------------------------------
116
+ Support for axes.prop_cycle property * markevery * in rcParams
117
+ ------------------------------------------------------------
114
118
115
119
The Matplotlib ``rcParams `` settings object now supports configuration
116
120
of the attribute `axes.prop_cycle ` with cyclers using the `markevery `
117
121
Line2D object property. An example of this feature is provided at
118
- `~matplotlib/examples/lines_bars_and_markers/markevery_prop_cycle.py `
122
+ `~/ matplotlib/examples/lines_bars_and_markers/markevery_prop_cycle.py `
119
123
120
124
Multipage PDF support for pgf backend
121
125
-------------------------------------
@@ -144,8 +148,8 @@ We acknowledge that the majority of people do not like egg-shaped pies.
144
148
Therefore, an axes to which a pie chart is plotted will be set to have
145
149
equal aspect ratio by default. This ensures that the pie appears circular
146
150
independent on the axes size or units. To revert to the previous behaviour
147
- you may set the axes' aspect to automatic, ax.set_aspect("auto") or
148
- plt.axis("auto").
151
+ set the axes' aspect ratio to automatic by using `` ax.set_aspect("auto") `` or
152
+ `` plt.axis("auto") `` .
149
153
150
154
Add ``ax.get_gridspec `` to `.SubplotBase `
151
155
-----------------------------------------
@@ -169,8 +173,8 @@ easily get the gridspec that went into making an axes:
169
173
plt.show()
170
174
171
175
172
- Axes title will no longer overlap xaxis
173
- ---------------------------------------
176
+ Axes titles will no longer overlap xaxis
177
+ ----------------------------------------
174
178
175
179
Previously an axes title had to be moved manually if an xaxis overlapped
176
180
(usually when the xaxis was put on the top of the axes). Now, the title
0 commit comments