Skip to content

Commit 53ea816

Browse files
committed
DOC: Add 3D plots to plot_types gallery
README.rst to README.md .rst to .md for README .rst to .md README DOC: add API change note for colorbar deprecation added twine install and check of readme rendering Fix mask lookup in fill_between for NumPy 1.24+ Fixes #24106 Add exception class to pytest.warns calls This is failing on current pytest. DOC: Remove overly complex examples from plot_types/3D
1 parent 910ed53 commit 53ea816

File tree

8 files changed

+113
-124
lines changed

8 files changed

+113
-124
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/*

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: <matplotlib-users@python.org>
58+
- [Announcement](https://mail.python.org/mailman/listinfo/matplotlib-announce)
59+
mailing list: <matplotlib-announce@python.org>
60+
- [Development](https://mail.python.org/mailman/listinfo/matplotlib-devel)
61+
mailing list: <matplotlib-devel@python.org>
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.
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())``.

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5272,7 +5272,7 @@ def _fill_between_x_or_y(
52725272
raise ValueError(f"where size ({where.size}) does not match "
52735273
f"{ind_dir} size ({ind.size})")
52745274
where = where & ~functools.reduce(
5275-
np.logical_or, map(np.ma.getmask, [ind, dep1, dep2]))
5275+
np.logical_or, map(np.ma.getmaskarray, [ind, dep1, dep2]))
52765276

52775277
ind, dep1, dep2 = np.broadcast_arrays(
52785278
np.atleast_1d(ind), dep1, dep2, subok=True)

lib/matplotlib/tests/test_axes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,13 +491,15 @@ def test_subclass_clear_cla():
491491
# Note, we cannot use mocking here as we want to be sure that the
492492
# superclass fallback does not recurse.
493493

494-
with pytest.warns(match='Overriding `Axes.cla`'):
494+
with pytest.warns(PendingDeprecationWarning,
495+
match='Overriding `Axes.cla`'):
495496
class ClaAxes(Axes):
496497
def cla(self):
497498
nonlocal called
498499
called = True
499500

500-
with pytest.warns(match='Overriding `Axes.cla`'):
501+
with pytest.warns(PendingDeprecationWarning,
502+
match='Overriding `Axes.cla`'):
501503
class ClaSuperAxes(Axes):
502504
def cla(self):
503505
nonlocal called

lib/matplotlib/tests/test_colors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_double_register_builtin_cmap():
117117
mpl.colormaps[name], name=name, force=True
118118
)
119119
with pytest.raises(ValueError, match='A colormap named "viridis"'):
120-
with pytest.warns():
120+
with pytest.warns(PendingDeprecationWarning):
121121
cm.register_cmap(name, mpl.colormaps[name])
122122
with pytest.warns(UserWarning):
123123
# TODO is warning more than once!
@@ -128,7 +128,7 @@ def test_unregister_builtin_cmap():
128128
name = "viridis"
129129
match = f'cannot unregister {name!r} which is a builtin colormap.'
130130
with pytest.raises(ValueError, match=match):
131-
with pytest.warns():
131+
with pytest.warns(PendingDeprecationWarning):
132132
cm.unregister_cmap(name)
133133

134134

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ def make_release_tree(self, base_dir, files):
271271
'Forum': 'https://discourse.matplotlib.org/',
272272
'Donate': 'https://numfocus.org/donate-to-matplotlib'
273273
},
274-
long_description=Path("README.rst").read_text(encoding="utf-8"),
275-
long_description_content_type="text/x-rst",
274+
long_description=Path("README.md").read_text(encoding="utf-8"),
275+
long_description_content_type="text/markdown",
276276
license="PSF",
277277
platforms="any",
278278
classifiers=[

0 commit comments

Comments
 (0)