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

Skip to content

Commit 2ef064c

Browse files
Removed pyplot.plotting
1 parent 3f78c1a commit 2ef064c

File tree

172 files changed

+2190
-1870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+2190
-1870
lines changed

.flake8

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
[flake8]
22
max-line-length = 79
3+
select =
4+
# flake8 default
5+
C90, E, F, W,
6+
# docstring-convention=numpy
7+
D100, D101, D102, D103, D104, D105, D106,
8+
D200, D201, D202, D204, D205, D206, D207, D208,
9+
D209, D210, D211, D214, D215,
10+
D300, D301, D302,
11+
D400, D401, D403, D404, D405, D406, D407, D408,
12+
D409, D410, D411, D412, D414,
13+
# matplotlib-specific extra pydocstyle errors
14+
D213,
315
ignore =
4-
# Normal default
16+
# flake8 default
517
E121,E123,E126,E226,E24,E704,W503,W504,
618
# Additional ignores:
719
E122, E127, E131,
@@ -13,9 +25,9 @@ ignore =
1325
N801, N802, N803, N806, N812,
1426
# pydocstyle
1527
D100, D101, D102, D103, D104, D105, D106, D107,
16-
D200, D202, D203, D204, D205, D207, D212, D213,
17-
D301
18-
D400, D401, D402, D403, D413,
28+
D200, D202, D203, D204, D205, D207, D212,
29+
D301,
30+
D400, D401, D402, D403, D404, D413,
1931

2032
exclude =
2133
.git

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,5 @@ lib/z.lib
104104
#########################
105105

106106
jquery-ui-*/
107+
lib/matplotlib/backends/web_backend/node_modules/
108+
lib/matplotlib/backends/web_backend/package-lock.json

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ script:
192192
fi
193193
- |
194194
if [[ $RUN_FLAKE8 == 1 ]]; then
195-
flake8 --statistics && echo "Flake8 passed without any issues!"
195+
flake8 --docstring-convention=all --statistics && echo "Flake8 passed without any issues!"
196196
fi
197197
198198
before_cache: |

INSTALL.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ Dependencies
108108
Matplotlib requires the following dependencies:
109109

110110
* `Python <https://www.python.org/downloads/>`_ (>= 3.6)
111-
* `NumPy <http://www.numpy.org>`_ (>= 1.15)
111+
* `NumPy <https://numpy.org>`_ (>= 1.15)
112112
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
113-
* `cycler <http://matplotlib.org/cycler/>`_ (>= 0.10.0)
113+
* `cycler <https://matplotlib.org/cycler/>`_ (>= 0.10.0)
114114
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.1)
115115
* `kiwisolver <https://github.com/nucleic/kiwi>`_ (>= 1.0.0)
116116
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>= 6.2)

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
.. _Downloads: https://pepy.tech/project/matplotlib/month
3939

4040
.. |NUMFocus| image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
41-
.. _NUMFocus: https://www.numfocus.org
41+
.. _NUMFocus: https://numfocus.org
4242

4343
.. image:: https://matplotlib.org/_static/logo2.svg
4444

doc/api/animation_api.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ at a time and ``finish()`` finalizes the movie and writes the output
212212
file to disk. For example ::
213213

214214
moviewriter = MovieWriter(...)
215-
moviewriter.setup(fig=fig, 'my_movie.ext', dpi=100)
215+
moviewriter.setup(fig, 'my_movie.ext', dpi=100)
216216
for j in range(n):
217-
update_figure(n)
217+
update_figure(j)
218218
moviewriter.grab_frame()
219219
moviewriter.finish()
220220

@@ -223,7 +223,7 @@ strongly encouraged to use the `~MovieWriter.saving` context manager ::
223223

224224
with moviewriter.saving(fig, 'myfile.mp4', dpi=100):
225225
for j in range(n):
226-
update_figure(n)
226+
update_figure(j)
227227
moviewriter.grab_frame()
228228

229229
to ensures that setup and cleanup are performed as necessary.

doc/api/api_changes_3.3/behaviour.rst

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ deprecation warning.
9898
`~.Axes.errorbar` now color cycles when only errorbar color is set
9999
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100100

101-
Previously setting the *ecolor* would turn off automatic color cycling for the plot, leading to the
102-
the lines and markers defaulting to whatever the first color in the color cycle was in the case of
103-
multiple plot calls.
101+
Previously setting the *ecolor* would turn off automatic color cycling for the plot, leading to the
102+
the lines and markers defaulting to whatever the first color in the color cycle was in the case of
103+
multiple plot calls.
104104

105105
`.rcsetup.validate_color_for_prop_cycle` now always raises TypeError for bytes input
106106
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -155,3 +155,24 @@ support for it will be dropped in a future Matplotlib release.
155155
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156156
Previously, keyword arguments were silently ignored when no positional
157157
arguments were given.
158+
159+
`.Axis.get_minorticklabels` and `.Axis.get_majorticklabels` now returns plain list
160+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161+
Previously, `.Axis.get_minorticklabels` and `.Axis.get_majorticklabels` returns
162+
silent_list. Their return type is now changed to normal list.
163+
`.get_xminorticklabels`, `.get_yminorticklabels`, `.get_zminorticklabels`,
164+
`.Axis.get_ticklabels`, `.get_xmajorticklabels`, `.get_ymajorticklabels` and
165+
`.get_zmajorticklabels` methods will be affected by this change.
166+
167+
Default slider formatter
168+
~~~~~~~~~~~~~~~~~~~~~~~~
169+
The default method used to format `.Slider` values has been changed to use a
170+
`.ScalarFormatter` adapted the slider values limits. This should ensure that
171+
values are displayed with an appropriate number of significant digits even if
172+
they are much smaller or much bigger than 1. To restore the old behavior,
173+
explicitly pass a "%1.2f" as the *valfmt* parameter to `.Slider`.
174+
175+
``table.CustomCell`` is now an alias for `.table.Cell`
176+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177+
All the functionality of ``CustomCell`` has been moved to its base class
178+
`~.table.Cell`.

doc/api/api_changes_3.3/deprecations.rst

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,12 @@ The ``Fil``, ``Fill``, ``Filll``, ``NegFil``, ``NegFill``, ``NegFilll``, and
366366
``SsGlue`` classes in the :mod:`matplotlib.mathtext` module are deprecated.
367367
As an alternative, directly construct glue instances with ``Glue("fil")``, etc.
368368

369-
NavigationToolbar2QT.parent
370-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
371-
This attribute is deprecated. In order to access the parent window, use
369+
NavigationToolbar2QT.parent and .basedir
370+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
371+
These attributes are deprecated. In order to access the parent window, use
372372
``toolbar.canvas.parent()``. Once the deprecation period is elapsed, it will
373-
also be accessible as ``toolbar.parent()``.
373+
also be accessible as ``toolbar.parent()``. The base directory to the icons
374+
is ``os.path.join(mpl.get_data_path(), "images")``.
374375

375376
Path helpers in :mod:`.bezier`
376377
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -423,6 +424,33 @@ or None is deprecated; set it to "horizontal" instead. Moreover, the two
423424
orientations ("horizontal" and "vertical") will become case-sensitive in the
424425
future.
425426

427+
`pyplot.plotting()` deprecated
428+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
429+
`pyplot.plotting()` is no-op function. It is now removed.
430+
426431
*minor* kwarg to `.Axis.get_ticklocs` will become keyword-only
427432
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
428433
Passing this argument positionally is deprecated.
434+
435+
Case-insensitive properties
436+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
437+
Normalization of upper or mixed-case property names to lowercase in
438+
`.Artist.set` and `.Artist.update` is deprecated. In the future, property
439+
names will be passed as is, allowing one to pass names such as *patchA* or
440+
*UVC*.
441+
442+
``ContourSet.ax``, ``Quiver.ax``
443+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444+
These attributes are deprecated in favor of ``ContourSet.axes`` and
445+
``Quiver.axes``, for consistency with other artists.
446+
447+
``Locator.refresh()`` and associated methods
448+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
449+
``Locator.refresh()`` is deprecated. This method was called at certain places
450+
to let locators update their internal state, typically based on the axis
451+
limits. Locators should now always consult the axis limits when called, if
452+
needed.
453+
454+
The associated helper methods ``NavigationToolbar2.draw()`` and
455+
``ToolViewsPositions.refresh_locators()`` are deprecated, and should be
456+
replaced by calls to ``draw_idle()`` on the corresponding canvas.

doc/api/axes_api.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ Adding Artists
447447
Axes.add_table
448448

449449

450-
Twinning
451-
========
450+
Twinning and sharing
451+
====================
452452

453453
.. autosummary::
454454
:toctree: _as_gen
@@ -458,6 +458,9 @@ Twinning
458458
Axes.twinx
459459
Axes.twiny
460460

461+
Axes.sharex
462+
Axes.sharey
463+
461464
Axes.get_shared_x_axes
462465
Axes.get_shared_y_axes
463466

doc/api/toolkits/mplot3d/faq.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
mplot3d FAQ
55
***********
66

7-
How is mplot3d different from MayaVi?
7+
How is mplot3d different from Mayavi?
88
=====================================
9-
`MayaVi2 <http://code.enthought.com/projects/mayavi/documentation.php>`_
9+
`Mayavi <https://docs.enthought.com/mayavi/mayavi/>`_
1010
is a very powerful and featureful 3D graphing library. For advanced
1111
3D scenes and excellent rendering capabilities, it is highly recommended to
12-
use MayaVi2.
12+
use Mayavi.
1313

1414
mplot3d was intended to allow users to create simple 3D graphs with the same
1515
"look-and-feel" as matplotlib's 2D plots. Furthermore, users can use the same
@@ -38,7 +38,7 @@ rendered properly in matplotlib's 2D rendering engine.
3838
This problem will likely not be solved until OpenGL support is added to all of
3939
the backends (patches are greatly welcomed). Until then, if you need complex
4040
3D scenes, we recommend using
41-
`MayaVi <http://code.enthought.com/projects/mayavi/documentation.php>`_.
41+
`MayaVi <https://docs.enthought.com/mayavi/mayavi/>`_.
4242

4343

4444
I don't like how the 3D plot is laid out, how do I change that?

doc/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
# General configuration
2929
# ---------------------
3030

31+
# Strip backslahes in function's signature
32+
# To be removed when numpydoc > 0.9.x
33+
strip_signature_backslash = True
34+
3135
# Add any Sphinx extension module names here, as strings. They can be
3236
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3337
extensions = [
@@ -261,8 +265,10 @@ def _check_dependencies():
261265

262266
# Custom sidebar templates, maps page names to templates.
263267
html_sidebars = {
264-
'index': ['sidebar_announcement.html', 'sidebar_versions.html',
265-
'donate_sidebar.html'],
268+
'index': [
269+
# 'sidebar_announcement.html',
270+
'sidebar_versions.html',
271+
'donate_sidebar.html'],
266272
'**': ['localtoc.html', 'relations.html', 'pagesource.html']
267273
}
268274

doc/devel/MEP/MEP11.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Implementation
117117
For installing from source, and assuming the user has all of the
118118
C-level compilers and dependencies, this can be accomplished fairly
119119
easily using distribute_ and following the instructions `here
120-
<https://pypi.python.org/pypi/distribute>`_. The only anticipated
120+
<https://pypi.org/project/distribute>`_. The only anticipated
121121
change to the matplotlib library code will be to import pyparsing_
122122
from the top-level namespace rather than from within matplotlib. Note
123123
that distribute_ will also allow us to remove the direct dependency

doc/devel/MEP/MEP12.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ sections described above. "Clean-up" should involve:
105105

106106

107107
* PEP8_ clean-ups (running `flake8
108-
<https://pypi.python.org/pypi/flake8>`_, or a similar checker, is
108+
<https://pypi.org/project/flake8>`_, or a similar checker, is
109109
highly recommended)
110110
* Commented-out code should be removed.
111111
* Replace uses of `pylab` interface with `.pyplot` (+ `numpy`,
@@ -141,8 +141,8 @@ page instead of the gallery examples.
141141
references to that example. For example, the API documentation for
142142
:file:`axes.py` and :file:`pyplot.py` may use these examples to generate
143143
plots. Use your favorite search tool (e.g., grep, ack, `grin
144-
<https://pypi.python.org/pypi/grin>`_, `pss
145-
<https://pypi.python.org/pypi/pss>`_) to search the matplotlib
144+
<https://pypi.org/project/grin>`_, `pss
145+
<https://pypi.org/project/pss>`_) to search the matplotlib
146146
package. See `2dc9a46
147147
<https://github.com/tonysyu/matplotlib/commit/2dc9a4651e5e566afc0866c603aa8d06aaf32b71>`_
148148
and `aa6b410

doc/devel/coding_guide.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
.. _pr-guidelines:
22

3+
.. raw:: html
4+
5+
<style>
6+
.checklist { list-style: none; padding: 0; margin: 0; }
7+
.checklist li { margin-left: 24px; padding-left: 23px; margin-right: 6px; }
8+
.checklist li:before { content: "\2610\2001"; margin-left: -24px; }
9+
.checklist li p {display: inline; }
10+
</style>
11+
312
***********************
413
Pull request guidelines
514
***********************
@@ -23,6 +32,8 @@ Summary for PR authors
2332

2433
When making a PR, pay attention to:
2534

35+
.. rst-class:: checklist
36+
2637
* :ref:`Target the master branch <pr-branch-selection>`.
2738
* Adhere to the :ref:`coding_guidelines`.
2839
* Update the :ref:`documentation <pr-documentation>` if necessary.
@@ -53,13 +64,17 @@ Summary for PR reviewers
5364

5465
Content topics:
5566

67+
.. rst-class:: checklist
68+
5669
* Is the feature / bugfix reasonable?
5770
* Does the PR conform with the :ref:`coding_guidelines`?
5871
* Is the :ref:`documentation <pr-documentation>` (docstrings, examples,
5972
what's new, API changes) updated?
6073

6174
Organizational topics:
6275

76+
.. rst-class:: checklist
77+
6378
* Make sure all :ref:`automated tests <pr-automated-tests>` pass.
6479
* The PR should :ref:`target the master branch <pr-branch-selection>`.
6580
* Tag with descriptive :ref:`labels <pr-labels>`.

doc/devel/release_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,5 +362,5 @@ numpy/scipy/scikit-image mailing lists.
362362

363363
In addition, announcements should be made on social networks (twitter
364364
via the ``@matplotlib`` account, any other via personal accounts).
365-
`NumFOCUS <https://www.numfocus.org/>`__ should be contacted for
365+
`NumFOCUS <https://numfocus.org/>`__ should be contacted for
366366
inclusion in their newsletter.

doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Open source
187187

188188
.. raw:: html
189189

190-
<a href="https://www.numfocus.org/">
190+
<a href="https://numfocus.org/">
191191
<img src="_static/numfocus_badge.png"
192192
alt="A Fiscally Sponsored Project of NUMFocus"
193193
style="float:right; margin-left:20px" />
@@ -210,7 +210,7 @@ the NumFOCUS organization or to the `John Hunter Technology Fellowship
210210
<jdh-fellowship_>`_.
211211

212212
.. _donating: https://numfocus.org/donate-to-matplotlib
213-
.. _jdh-fellowship: https://www.numfocus.org/programs/john-hunter-technology-fellowship/
213+
.. _jdh-fellowship: https://numfocus.org/programs/john-hunter-technology-fellowship/
214214
.. _nf: https://numfocus.org
215215

216216
The :doc:`Matplotlib license <users/license>` is based on the `Python Software

0 commit comments

Comments
 (0)