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

Skip to content

Commit 314f58a

Browse files
Merge branch 'matplotlib:main' into download
2 parents 5484d5c + f95cdd3 commit 314f58a

Some content is hidden

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

60 files changed

+1207
-571
lines changed

.github/workflows/cibuildsdist.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@ jobs:
6262

6363
- name: Check version number is not 0
6464
run: python ./ci/check_version_number.py
65+
66+
- name: Install twine
67+
run: pip install twine
68+
69+
- name: Check README rendering for PyPI
70+
run: twine check dist/*

.github/workflows/tests.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
python-version: 3.8
3838
extra-requirements: '-c requirements/testing/minver.txt'
3939
pyqt5-ver: '==5.11.2 sip==5.0.0' # oldest versions with a Py3.8 wheel.
40+
pyqt6-ver: '==6.1.0 PyQt6-Qt6==6.1.0'
41+
pyside2-ver: '==5.14.0' # oldest version with working Py3.8 wheel.
42+
pyside6-ver: '==6.0.0'
4043
delete-font-cache: true
4144
- os: ubuntu-20.04
4245
python-version: 3.8
@@ -189,17 +192,17 @@ jobs:
189192
echo 'PyQt5 is available' ||
190193
echo 'PyQt5 is not available'
191194
if [[ "${{ runner.os }}" != 'macOS' ]]; then
192-
python -mpip install --upgrade pyside2 &&
195+
python -mpip install --upgrade pyside2${{ matrix.pyside2-ver }} &&
193196
python -c 'import PySide2.QtCore' &&
194197
echo 'PySide2 is available' ||
195198
echo 'PySide2 is not available'
196199
fi
197200
if [[ "${{ matrix.os }}" = ubuntu-20.04 ]]; then
198-
python -mpip install --upgrade pyqt6 &&
201+
python -mpip install --upgrade pyqt6${{ matrix.pyqt6-ver }} &&
199202
python -c 'import PyQt6.QtCore' &&
200203
echo 'PyQt6 is available' ||
201204
echo 'PyQt6 is not available'
202-
python -mpip install --upgrade pyside6 &&
205+
python -mpip install --upgrade pyside6${{ matrix.pyside6-ver }} &&
203206
python -c 'import PySide6.QtCore' &&
204207
echo 'PySide6 is available' ||
205208
echo 'PySide6 is not available'
@@ -240,9 +243,13 @@ jobs:
240243
241244
cat mplsetup.cfg
242245
243-
# All dependencies must have been pre-installed, so that the minver
244-
# constraints are held.
245-
python -m pip install --no-deps -ve .
246+
if [[ "${{ matrix.name-suffix }}" == '(Minimum Versions)' ]]; then
247+
# Minimum versions run does not use build isolation so that it
248+
# builds against the pre-installed minver dependencies.
249+
python -m pip install --no-deps --no-build-isolation -ve .
250+
else
251+
python -m pip install --no-deps -ve .
252+
fi
246253
247254
if [[ "${{ runner.os }}" != 'macOS' ]]; then
248255
unset CPPFLAGS

README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
[![PyPi](https://badge.fury.io/py/matplotlib.svg)](https://badge.fury.io/py/matplotlib)
2+
[![Downloads](https://pepy.tech/badge/matplotlib/month)](https://pepy.tech/project/matplotlib)
3+
[![NUMFocus](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org)
4+
5+
[![DiscourseBadge](https://img.shields.io/badge/help_forum-discourse-blue.svg)](https://discourse.matplotlib.org)
6+
[![Gitter](https://badges.gitter.im/matplotlib/matplotlib.svg)](https://gitter.im/matplotlib/matplotlib)
7+
[![GitHubIssues](https://img.shields.io/badge/issue_tracking-github-blue.svg)](https://github.com/matplotlib/matplotlib/issues)
8+
[![GitTutorial](https://img.shields.io/badge/PR-Welcome-%23FF8300.svg?)](https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project)
9+
10+
[![GitHubActions](https://github.com/matplotlib/matplotlib/workflows/Tests/badge.svg)](https://github.com/matplotlib/matplotlib/actions?query=workflow%3ATests)
11+
[![AzurePipelines](https://dev.azure.com/matplotlib/matplotlib/_apis/build/status/matplotlib.matplotlib?branchName=main)](https://dev.azure.com/matplotlib/matplotlib/_build/latest?definitionId=1&branchName=main)
12+
[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/matplotlib/matplotlib?branch=main&svg=true)](https://ci.appveyor.com/project/matplotlib/matplotlib)
13+
[![Codecov](https://codecov.io/github/matplotlib/matplotlib/badge.svg?branch=main&service=github)](https://codecov.io/github/matplotlib/matplotlib?branch=main)
14+
[![LGTM](https://img.shields.io/lgtm/grade/python/github/matplotlib/matplotlib.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/matplotlib/matplotlib)
15+
16+
![image](https://matplotlib.org/_static/logo2.svg)
17+
18+
Matplotlib is a comprehensive library for creating static, animated, and
19+
interactive visualizations in Python.
20+
21+
Check out our [home page](https://matplotlib.org/) for more information.
22+
23+
![image](https://matplotlib.org/_static/readme_preview.png)
24+
25+
Matplotlib produces publication-quality figures in a variety of hardcopy
26+
formats and interactive environments across platforms. Matplotlib can be
27+
used in Python scripts, Python/IPython shells, web application servers,
28+
and various graphical user interface toolkits.
29+
30+
## Install
31+
32+
See the [install
33+
documentation](https://matplotlib.org/stable/users/installing/index.html),
34+
which is generated from `/doc/users/installing/index.rst`
35+
36+
## Contribute
37+
38+
You've discovered a bug or something else you want to change -
39+
excellent!
40+
41+
You've worked out a way to fix it -- even better!
42+
43+
You want to tell us about it -- best of all!
44+
45+
Start at the [contributing
46+
guide](https://matplotlib.org/devdocs/devel/contributing.html)!
47+
48+
## Contact
49+
50+
[Discourse](https://discourse.matplotlib.org/) is the discussion forum
51+
for general questions and discussions and our recommended starting
52+
point.
53+
54+
Our active mailing lists (which are mirrored on Discourse) are:
55+
56+
- [Users](https://mail.python.org/mailman/listinfo/matplotlib-users)
57+
mailing list: <[email protected]>
58+
- [Announcement](https://mail.python.org/mailman/listinfo/matplotlib-announce)
59+
mailing list: <[email protected]>
60+
- [Development](https://mail.python.org/mailman/listinfo/matplotlib-devel)
61+
mailing list: <[email protected]>
62+
63+
[Gitter](https://gitter.im/matplotlib/matplotlib) is for coordinating
64+
development and asking questions directly related to contributing to
65+
matplotlib.
66+
67+
## Citing Matplotlib
68+
69+
If Matplotlib contributes to a project that leads to publication, please
70+
acknowledge this by citing Matplotlib.
71+
72+
[A ready-made citation
73+
entry](https://matplotlib.org/stable/users/project/citing.html) is
74+
available.
75+
76+
### Research notice
77+
78+
Please note that this repository is participating in a study into
79+
sustainability of open source projects. Data will be gathered about this
80+
repository for approximately the next 12 months, starting from June
81+
2021.
82+
83+
Data collected will include number of contributors, number of PRs, time
84+
taken to close/merge these PRs, and issues closed.
85+
86+
For more information, please visit [the informational
87+
page](https://sustainable-open-science-and-software.github.io/) or
88+
download the [participant information
89+
sheet](https://sustainable-open-science-and-software.github.io/assets/PIS_sustainable_software.pdf).

README.rst

Lines changed: 0 additions & 117 deletions
This file was deleted.

doc/api/animation_api.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ this hopefully minimalist example gives a sense of how ``init_func``
9797
and ``func`` are used inside of `FuncAnimation` and the theory of how
9898
'blitting' works.
9999

100+
.. note::
101+
102+
The zorder of artists is not taken into account when 'blitting'
103+
because the 'blitted' artists are always drawn on top.
104+
100105
The expected signature on ``func`` and ``init_func`` is very simple to
101106
keep `FuncAnimation` out of your book keeping and plotting logic, but
102107
this means that the callable objects you pass in must know what
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``axes3d.vvec``, ``axes3d.eye``, ``axes3d.sx``, and ``axes3d.sy``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... are deprecated without replacement.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``matplotlib.pyplot.get_plot_commands``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
... is a pending deprecation. This is considered internal and no end-user
5+
should need it.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Colorbars for orphaned mappables are deprecated, but no longer raise
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Before 3.6.0, Colorbars for mappables that do not have a parent axes would
5+
steal space from the current Axes. 3.6.0 raised an error on this, but without
6+
a deprecation cycle. For 3.6.1 this is reverted, the current axes is used,
7+
but a deprecation warning is shown instead. In this undetermined case users
8+
and libraries should explicitly specify what axes they want space to be stolen
9+
from: ``fig.colorbar(mappable, ax=plt.gca())``.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
``contour.ClabelText`` and ``ContourLabeler.set_label_props``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... are deprecated.
4+
5+
Use ``Text(..., transform_rotates_text=True)`` as a replacement for
6+
``contour.ClabelText(...)`` and ``text.set(text=text, color=color,
7+
fontproperties=labeler.labelFontProps, clip_box=labeler.axes.bbox)`` as a
8+
replacement for the ``ContourLabeler.set_label_props(label, text, color)``.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``ContourLabeler`` attributes
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
The ``labelFontProps``, ``labelFontSizeList``, and ``labelTextsList``
4+
attributes of `.ContourLabeler` have been deprecated. Use the ``labelTexts``
5+
attribute and the font properties of the corresponding text objects instead.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
``epoch2num`` and ``num2epoch`` are removed
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
These methods convert from unix timestamps to matplotlib floats, but are not
5+
used internally to Matplotlib, and should not be needed by end users. To
6+
convert a unix timestamp to datetime, simply use
7+
`datetime.datetime.utcfromtimestamp`, or to use NumPy `~numpy.datetime64`
8+
``dt = np.datetime64(e*1e6, 'us')``.
9+
10+
11+
Locator and Formatter wrapper methods
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
14+
The ``set_view_interval``, ``set_data_interval`` and ``set_bounds`` methods of
15+
`.Locator`\s and `.Formatter`\s (and their common base class, TickHelper) are
16+
removed. Directly manipulate the view and data intervals on the underlying
17+
axis instead.

doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@ experimental and may change in the future.
545545
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
546546
... is deprecated.
547547

548-
`.epoch2num` and `.num2epoch` are deprecated
549-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
548+
``epoch2num`` and ``num2epoch`` are deprecated
549+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
550550
These are unused and can be easily reproduced by other date tools.
551551
`.get_epoch` will return Matplotlib's epoch.
552552

doc/api/prev_api_changes/api_changes_3.3.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ reverts the deprecation.
1515
Functions ``epoch2num`` and ``dates.julian2num`` use ``date.epoch`` rcParam
1616
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1717

18-
Now `~.dates.epoch2num` and (undocumented) ``julian2num`` return floating point
18+
Now ``epoch2num`` and (undocumented) ``julian2num`` return floating point
1919
days since `~.dates.get_epoch` as set by :rc:`date.epoch`, instead of
2020
floating point days since the old epoch of "0000-12-31T00:00:00". If
2121
needed, you can translate from the new to old values as

doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ In Matplotlib 3.6 we have marked those top level functions as pending
5252
deprecation with the intention of deprecation in Matplotlib 3.7. The following
5353
functions have been marked for pending deprecation:
5454

55-
- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead
55+
- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead if you
56+
have a `str`.
57+
58+
**Added 3.6.1** Use `matplotlib.cm.ColormapRegistry.get_cmap` if you
59+
have a string, `None` or a `matplotlib.colors.Colormap` object that you want
60+
to convert to a `matplotlib.colors.Colormap` instance.
5661
- ``matplotlib.cm.register_cmap``; use `matplotlib.colormaps.register
5762
<.ColormapRegistry.register>` instead
5863
- ``matplotlib.cm.unregister_cmap``; use `matplotlib.colormaps.unregister
@@ -305,7 +310,7 @@ Backend-specific deprecations
305310
private functions if you rely on it.
306311
- ``backend_svg.generate_transform`` and ``backend_svg.generate_css``
307312
- ``backend_tk.NavigationToolbar2Tk.lastrect`` and
308-
``backend_tk.RubberbandTk.lastrect``
313+
``backend_tk.RubberbandTk.lastrect``
309314
- ``backend_tk.NavigationToolbar2Tk.window``; use ``toolbar.master`` instead.
310315
- ``backend_tools.ToolBase.destroy``; To run code upon tool removal, connect to
311316
the ``tool_removed_event`` event.

doc/devel/coding_guide.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ When making a PR, pay attention to:
4545
on GitHub.
4646
* When updating your PR, instead of adding new commits to fix something, please
4747
consider amending your initial commit(s) to keep the history clean.
48-
You can achieve this using
48+
You can achieve this by using
4949

5050
.. code-block:: bash
5151
@@ -136,11 +136,11 @@ Milestones
136136
* *New features and API changes* are milestoned for the next minor release
137137
``v3.N.0``.
138138

139-
* *Bugfixes and docstring changes* are milestoned for the next patch
140-
release ``v3.N.M``
139+
* *Bugfixes, tests for released code, and docstring changes* are milestoned
140+
for the next patch release ``v3.N.M``.
141141

142142
* *Documentation changes* (all .rst files and examples) are milestoned
143-
``v3.N-doc``
143+
``v3.N-doc``.
144144

145145
If multiple rules apply, choose the first matching from the above list.
146146

0 commit comments

Comments
 (0)