Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 173f04c

Browse files
committed
Add what's new
1 parent 40192f6 commit 173f04c

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

doc/users/whats_new/style_changes.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
Changes to the default style
2+
----------------------------
3+
4+
The most important changes in matplotlib 2.0 are the changes to the
5+
default style.
6+
7+
While it is impossible to select the best default for all cases, these
8+
are designed to work well in the most common cases.
9+
10+
These changes include:
11+
12+
Colors
13+
``````
14+
15+
- The default figure background color has changed from grey to white.
16+
17+
- The default cycle of colors to draw lines, markers and other content
18+
has been changed. It is based on the `Vega category10 palette
19+
<https://github.com/vega/vega/wiki/Scales#scale-range-literals>`__.
20+
21+
- The default color map used for images and pcolor meshes, etc., has
22+
changed from ``jet`` to ``viridis``.
23+
24+
- For markers, scatter plots, bar charts and pie charts, there is no
25+
longer a black outline around filled markers by default.
26+
27+
- Grid lines are light grey solid 1pt lines. They are no longer dashed by
28+
default.
29+
30+
- The ''Blues'' colormap has been adjusted to be perceptually uniform.
31+
The old ``blues`` colormap is available under the name
32+
``legacy_Blues``.
33+
34+
Plot layout
35+
```````````
36+
37+
- The default dpi used for on-screen is now 100, which is the same as
38+
the old default for saving files. Due to this, the on-screen
39+
display is now more what-you-see-is-what-you-get.
40+
41+
- The number of ticks on an axis is now automatically determined based
42+
on the length of the axis.
43+
44+
- The limits are scaled to exactly the dimensions of the data, plus 5%
45+
padding. The old behavior was to scale to the nearest "round"
46+
numbers. To use the old behavior, set the ``rcParam``
47+
``axes.autolimit_mode`` to ``round_numbers``.
48+
49+
- Ticks now point outward by default. To have ticks pointing inward,
50+
use the ``rcParams`` ``xtick.direction`` and ``ytick.direction``.
51+
52+
- By default, caps on the ends of errorbars are not present.
53+
54+
Images
55+
``````
56+
57+
- The default mode for image interpolation is now ``nearest``.
58+
59+
- The default shading mode is now ``overlay``. Formerly, it was
60+
``hsv``.
61+
62+
Fonts
63+
`````
64+
65+
- The default font has changed from "Bitstream Vera Sans" to "DejaVu
66+
Sans". "DejaVu Sans" is an improvement on "Bistream Vera Sans" that
67+
adds more international and math characters, but otherwise has the
68+
same appearance.
69+
70+
- The default math font when using the built-in math rendering engine
71+
(mathtext) has changed from "Computer Modern" (i.e. LaTeX-like) to
72+
"DejaVu Sans". To revert to the old behavior, set the ``rcParam``
73+
``mathtext.fontset`` to ``cm``. This change has no effect if the
74+
TeX backend is used (i.e. ``text.usetex`` is ``True``).
75+
76+
Dates
77+
`````
78+
79+
- The default date formats are now all based on ISO format, i.e., with
80+
the slowest-moving value first. The date formatters are still
81+
changeable through the ``date.autoformatter.*`` rcParams. Python's
82+
``%x`` and ``%X`` date formats may be of particular interest to
83+
format dates based on the current locale.
84+
85+
Legends
86+
```````
87+
88+
- By default, the number of points displayed in a legend is now 1.
89+
90+
- The default legend location is ``best``, so the legend will be
91+
automatically placed in a location to obscure the least amount of
92+
data possible.
93+
94+
- The legend now has rounded corners by default.

0 commit comments

Comments
 (0)