@@ -27,7 +27,8 @@ New in Matplotlib 2.1
27
27
Documentation
28
28
+++++++++++++
29
29
30
- The examples have been migrated to use sphinx gallery. This allows
30
+ The examples have been migrated to use `sphinx gallery
31
+ <https://sphinx-gallery.readthedocs.io/en/latest/> `__. This allows
31
32
better mixing of prose and code in the examples, provides links to
32
33
download the examples as both a Python script and a Jupyter notebook,
33
34
and improves the thumbnail galleries. The examples have been
@@ -115,7 +116,7 @@ angular ticks have been modified to be parallel to the grid line. It may also
115
116
be useful to rotate tick *labels * to match the boundary. Calling
116
117
``ax.tick_params(rotation='auto') `` will enable new behavior: radial tick
117
118
labels will be parallel to the circular grid line, and angular tick labels will
118
- be perpendicular to the grid line (i.e., parallel to the outer boundary.)
119
+ be perpendicular to the grid line (i.e., parallel to the outer boundary).
119
120
120
121
121
122
``Figure `` class now has ``subplots `` method
@@ -132,16 +133,13 @@ Metadata savefig keyword argument
132
133
:func: `~matplotlib.pyplot.savefig ` now accepts ``metadata `` as a keyword
133
134
argument. It can be used to store key/value pairs in the image metadata.
134
135
135
- Supported formats and backends
136
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136
+
137
137
* 'png' with Agg backend
138
138
* 'pdf' with PDF backend (see
139
139
:func: `~matplotlib.backends.backend_pdf.PdfFile.writeInfoDict ` for a list of
140
140
supported keywords)
141
141
* 'eps' and 'ps' with PS backend (only 'Creator' key is accepted)
142
142
143
- Example
144
- ~~~~~~~
145
143
::
146
144
147
145
plt.savefig('test.png', metadata={'Software': 'My awesome software'})
@@ -174,8 +172,8 @@ Reproducible PS, PDF and SVG output
174
172
-----------------------------------
175
173
176
174
The ``SOURCE_DATE_EPOCH `` environment variable can now be used to set
177
- the timestamp value in the PS and PDF outputs. See
178
- https://reproducible-builds.org/specs/source-date-epoch/
175
+ the timestamp value in the PS and PDF outputs. See ` source date epoch
176
+ < https://reproducible-builds.org/specs/source-date-epoch/> `__.
179
177
180
178
Alternatively, calling ``savefig `` with ``metadata={'creationDate': None} ``
181
179
will omit the timestamp altogether.
@@ -250,8 +248,8 @@ volumetric model.
250
248
Improvements
251
249
++++++++++++
252
250
253
- CheckButtons widget get_status function
254
- ---------------------------------------
251
+ CheckButtons widget `` get_status `` function
252
+ -------------------------------------------
255
253
256
254
A :func: `~matplotlib.widgets.CheckButtons.get_status ` method has been added to
257
255
the :class: `matplotlib.widgets.CheckButtons ` class. This ``get_status `` method
@@ -392,8 +390,8 @@ key arrow.
392
390
Colormap reversed method
393
391
------------------------
394
392
395
- The methods :meth: `~ matplotlib.colors.LinearSegmentedColormap.reversed ` and
396
- :meth: `~ matplotlib.colors.ListedColormap.reversed ` return a reversed
393
+ The methods :meth: `matplotlib.colors.LinearSegmentedColormap.reversed ` and
394
+ :meth: `matplotlib.colors.ListedColormap.reversed ` return a reversed
397
395
instance of the Colormap. This implements a way for any Colormap to be
398
396
reversed.
399
397
@@ -419,7 +417,8 @@ cases.
419
417
---------------------------------------------------
420
418
421
419
Bulk setting of tick label rotation is now possible via
422
- :func: `~matplotlib.axis.Axis.set_tick_params ` using the ``rotation `` keyword.
420
+ :func: `~matplotlib.axis.Axis.set_tick_params ` using the ``rotation ``
421
+ keyword.
423
422
424
423
Example
425
424
~~~~~~~
@@ -466,13 +465,14 @@ Example
466
465
plt.show()
467
466
468
467
469
- New which Parameter for ``autofmt_xdate ``
470
- -----------------------------------------
468
+ New `` which `` Parameter for ``autofmt_xdate ``
469
+ ---------------------------------------------
471
470
472
471
A ``which `` parameter now exists for the method
473
472
:func: `~matplotlib.figure.Figure.autofmt_xdate `. This allows a user to format
474
- ``major ``, ``minor `` or ``both `` tick labels selectively. If ``which `` is
475
- ``None `` (default) then the method will rotate ``major `` tick labels.
473
+ ``major ``, ``minor `` or ``both `` tick labels selectively. The
474
+ default behavior will rotate and align the ``major `` tick labels.
475
+
476
476
477
477
Example
478
478
~~~~~~~
@@ -512,11 +512,11 @@ New keyword argument ``sep`` for EngFormatter
512
512
A new ``sep `` keyword argument has been added to
513
513
:class: `~matplotlib.ticker.EngFormatter ` and provides a means to
514
514
define the string that will be used between the value and its
515
- unit. The default string is " ", which preserves the former
515
+ unit. The default string is `` " " `` , which preserves the former
516
516
behavior. Additionally, the separator is now present between the value
517
517
and its unit even in the absence of SI prefix. There was formerly a
518
- bug that was causing strings like "3.14V" to be returned instead of
519
- the expected "3.14 V" (with the default behavior).
518
+ bug that was causing strings like `` "3.14V" `` to be returned instead of
519
+ the expected `` "3.14 V" `` (with the default behavior).
520
520
521
521
Extend ``MATPLOTLIBRC `` behavior
522
522
--------------------------------
@@ -563,37 +563,25 @@ the API required by a class that is to be used as the ``writer`` in the
563
563
:class: `~matplotlib.animation.MovieWriter ` class now derives from the new
564
564
abstract base class.
565
565
566
- Validation of line style rcParams
567
- ---------------------------------
568
566
569
- Stricter validation
570
- ~~~~~~~~~~~~~~~~~~~
567
+ Stricter validation of line style rcParams
568
+ ------------------------------------------
569
+
571
570
The validation of rcParams that are related to line styles
572
571
(``lines.linestyle ``, ``boxplot.*.linestyle ``, ``grid.linestyle `` and
573
572
``contour.negative_linestyle ``) now effectively checks that the values
574
- are valid line styles. Strings like ``dashed `` or ``-- `` are accepted,
575
- as well as even-length sequences of on-off ink like ``[1, 1.65] ``. In
576
- this latter case, the offset value is handled internally and should * not *
577
- be provided by the user.
573
+ are valid line styles. Strings like ``' dashed' `` or ``'--' `` are
574
+ accepted, as well as even-length sequences of on-off ink like ``[1,
575
+ 1.65] ``. In this latter case, the offset value is handled internally
576
+ and should * not * be provided by the user.
578
577
579
- The validation is case-insensitive.
580
578
581
- Deprecation of the former validators for ``contour.negative_linestyle ``
582
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
583
579
The new validation scheme replaces the former one used for the
584
- ``contour.negative_linestyle `` rcParams, that was limited to `` solid ``
585
- and ``dashed `` line styles.
580
+ ``contour.negative_linestyle `` rcParams, that was limited to
581
+ `` 'solid' `` and ``' dashed' `` line styles.
586
582
587
- The former public validation functions ``validate_negative_linestyle ``
588
- and ``validate_negative_linestyle_legacy `` will be deprecated in 2.1 and
589
- may be removed in 2.3. There are no public functions to replace them.
590
-
591
- Examples of use
592
- ~~~~~~~~~~~~~~~
593
- ::
583
+ The validation is case-insensitive.
594
584
595
- grid.linestyle : (1, 3) # loosely dotted grid lines
596
- contour.negative_linestyle : dashdot # previously only solid or dashed
597
585
598
586
pytest
599
587
------
0 commit comments