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 6d89c85

Browse filesBrowse files
committed
DOC: respond to review comments
1 parent 7b58314 commit 6d89c85
Copy full SHA for 6d89c85

File tree

Expand file treeCollapse file tree

2 files changed

+46
-44
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+46
-44
lines changed

‎doc/api/api_changes.rst

Copy file name to clipboardExpand all lines: doc/api/api_changes.rst
+16-2Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ When using :func:`~matplotlib.axes.Axes.set_xlim` and
374374
results in a ``ValueError``. The previous behavior resulted in the
375375
limits being erroneously reset to ``(-0.001, 0.001)``.
376376

377-
`scatter` and `Collection` offsets are no longer implicitly flattened
378-
---------------------------------------------------------------------
377+
``scatter`` and ``Collection`` offsets are no longer implicitly flattened
378+
-------------------------------------------------------------------------
379379

380380
`~matplotlib.collections.Collection` (and thus both 2D
381381
`~matplotlib.axes.Axes.scatter` and 3D
@@ -384,6 +384,20 @@ longer implicitly flattens its offsets. As a consequence, ``scatter``'s ``x``
384384
and ``y`` arguments can no longer be 2+-dimensional arrays.
385385

386386

387+
Deprecation of the former validators for ``contour.negative_linestyle``
388+
-----------------------------------------------------------------------
389+
390+
391+
The former public validation functions ``validate_negative_linestyle``
392+
and ``validate_negative_linestyle_legacy`` will be deprecated in 2.1 and
393+
may be removed in 2.3. There are no public functions to replace them.
394+
395+
::
396+
397+
grid.linestyle : (1, 3) # loosely dotted grid lines
398+
contour.negative_linestyle : dashdot # previously only solid or dashed
399+
400+
387401
API Changes in 2.0.1
388402
====================
389403

‎doc/users/whats_new.rst

Copy file name to clipboardExpand all lines: doc/users/whats_new.rst
+30-42Lines changed: 30 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ New in Matplotlib 2.1
2727
Documentation
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
3132
better mixing of prose and code in the examples, provides links to
3233
download the examples as both a Python script and a Jupyter notebook,
3334
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
115116
be useful to rotate tick *labels* to match the boundary. Calling
116117
``ax.tick_params(rotation='auto')`` will enable new behavior: radial tick
117118
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).
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
133134
argument. 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

176174
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/>`__.
179177

180178
Alternatively, calling ``savefig`` with ``metadata={'creationDate': None}``
181179
will omit the timestamp altogether.
@@ -250,8 +248,8 @@ volumetric model.
250248
Improvements
251249
++++++++++++
252250

253-
CheckButtons widget get_status function
254-
---------------------------------------
251+
CheckButtons widget ``get_status`` function
252+
-------------------------------------------
255253

256254
A :func:`~matplotlib.widgets.CheckButtons.get_status` method has been added to
257255
the :class:`matplotlib.widgets.CheckButtons` class. This ``get_status`` method
@@ -392,8 +390,8 @@ key arrow.
392390
Colormap 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
397395
instance of the Colormap. This implements a way for any Colormap to be
398396
reversed.
399397

@@ -419,7 +417,8 @@ cases.
419417
---------------------------------------------------
420418

421419
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.
423422

424423
Example
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

472471
A ``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

477477
Example
478478
~~~~~~~
@@ -512,11 +512,11 @@ New keyword argument ``sep`` for EngFormatter
512512
A new ``sep`` keyword argument has been added to
513513
:class:`~matplotlib.ticker.EngFormatter` and provides a means to
514514
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
516516
behavior. Additionally, the separator is now present between the value
517517
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).
520520

521521
Extend ``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
564564
abstract base class.
565565

566-
Validation of line style rcParams
567-
---------------------------------
568566

569-
Stricter validation
570-
~~~~~~~~~~~~~~~~~~~
567+
Stricter validation of line style rcParams
568+
------------------------------------------
569+
571570
The 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-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
583579
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.
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

598586
pytest
599587
------

0 commit comments

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