@@ -27,7 +27,8 @@ New in Matplotlib 2.1
2727Documentation
2828+++++++++++++
2929
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
3132better mixing of prose and code in the examples, provides links to
3233download the examples as both a Python script and a Jupyter notebook,
3334and 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
115116be useful to rotate tick *labels * to match the boundary. Calling
116117``ax.tick_params(rotation='auto') `` will enable new behavior: radial tick
117118labels 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).
119120
120121
121122``Figure `` class now has ``subplots `` method
@@ -132,16 +133,13 @@ Metadata savefig keyword argument
132133:func: `~matplotlib.pyplot.savefig ` now accepts ``metadata `` as a keyword
133134argument. It can be used to store key/value pairs in the image metadata.
134135
135- Supported formats and backends
136- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136+
137137* 'png' with Agg backend
138138* 'pdf' with PDF backend (see
139139 :func: `~matplotlib.backends.backend_pdf.PdfFile.writeInfoDict ` for a list of
140140 supported keywords)
141141* 'eps' and 'ps' with PS backend (only 'Creator' key is accepted)
142142
143- Example
144- ~~~~~~~
145143::
146144
147145 plt.savefig('test.png', metadata={'Software': 'My awesome software'})
@@ -174,8 +172,8 @@ Reproducible PS, PDF and SVG output
174172-----------------------------------
175173
176174The ``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/> `__.
179177
180178Alternatively, calling ``savefig `` with ``metadata={'creationDate': None} ``
181179will omit the timestamp altogether.
@@ -250,8 +248,8 @@ volumetric model.
250248Improvements
251249++++++++++++
252250
253- CheckButtons widget get_status function
254- ---------------------------------------
251+ CheckButtons widget `` get_status `` function
252+ -------------------------------------------
255253
256254A :func: `~matplotlib.widgets.CheckButtons.get_status ` method has been added to
257255the :class: `matplotlib.widgets.CheckButtons ` class. This ``get_status `` method
@@ -392,8 +390,8 @@ key arrow.
392390Colormap reversed method
393391------------------------
394392
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
397395instance of the Colormap. This implements a way for any Colormap to be
398396reversed.
399397
@@ -419,7 +417,8 @@ cases.
419417---------------------------------------------------
420418
421419Bulk 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.
423422
424423Example
425424~~~~~~~
@@ -466,13 +465,14 @@ Example
466465 plt.show()
467466
468467
469- New which Parameter for ``autofmt_xdate ``
470- -----------------------------------------
468+ New `` which `` Parameter for ``autofmt_xdate ``
469+ ---------------------------------------------
471470
472471A ``which `` parameter now exists for the method
473472: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+
476476
477477Example
478478~~~~~~~
@@ -512,11 +512,11 @@ New keyword argument ``sep`` for EngFormatter
512512A new ``sep `` keyword argument has been added to
513513:class: `~matplotlib.ticker.EngFormatter ` and provides a means to
514514define 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
516516behavior. Additionally, the separator is now present between the value
517517and 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).
520520
521521Extend ``MATPLOTLIBRC `` behavior
522522--------------------------------
@@ -563,37 +563,25 @@ the API required by a class that is to be used as the ``writer`` in the
563563:class: `~matplotlib.animation.MovieWriter ` class now derives from the new
564564abstract base class.
565565
566- Validation of line style rcParams
567- ---------------------------------
568566
569- Stricter validation
570- ~~~~~~~~~~~~~~~~~~~
567+ Stricter validation of line style rcParams
568+ ------------------------------------------
569+
571570The validation of rcParams that are related to line styles
572571(``lines.linestyle ``, ``boxplot.*.linestyle ``, ``grid.linestyle `` and
573572``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.
578577
579- The validation is case-insensitive.
580578
581- Deprecation of the former validators for ``contour.negative_linestyle ``
582- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
583579The 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.
586582
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.
594584
595- grid.linestyle : (1, 3) # loosely dotted grid lines
596- contour.negative_linestyle : dashdot # previously only solid or dashed
597585
598586pytest
599587------
0 commit comments