8000 Merge branch v3.7.x into v3.8.x · matplotlib/matplotlib@09154ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 09154ea

Browse files
committed
Merge branch v3.7.x into v3.8.x
1 parent 9ea8344 commit 09154ea

File tree

14 files changed

+193
-25
lines changed

14 files changed

+193
-25
lines changed

doc/_static/zenodo_cache/8336761.svg

Lines changed: 35 additions & 0 deletions
Loading

doc/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
# All configuration values have a default value; values that are commented out
1212
# serve to show the default value.
1313

14+
from datetime import datetime, timezone
1415
import logging
1516
import os
1617
from pathlib import Path
1718
import shutil
1819
import subprocess
1920
import sys
21+
import time
2022
from urllib.parse import urlsplit, urlunsplit
2123
import warnings
2224

@@ -25,9 +27,6 @@
2527

2628
import matplotlib
2729

28-
from datetime import timezone
29-
from datetime import datetime
30-
import time
3130

3231
# debug that building expected version
3332
print(f"Building Documentation for Matplotlib: {matplotlib.__version__}")

doc/devel/testing.rst

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ case :file:`lib/matplotlib/tests/baseline_images/test_lines`). Put this new
122122
file under source code revision control (with ``git add``). When rerunning
123123
the tests, they should now pass.
124124

125+
It is preferred that new tests use ``style='mpl20'`` as this leads to smaller
126+
figures and reflects the newer look of default Matplotlib plots. Also, if the
127+
texts (labels, tick labels, etc) are not really part of what is tested, use
128+
``remove_text=True`` as this will lead to smaller figures and reduce possible
129+
issues with font mismatch on different platforms.
130+
125131
Baseline images take a lot of space in the Matplotlib repository.
126132
An alternative approach for image comparison tests is to use the
127133
`~matplotlib.testing.decorators.check_figures_equal` decorator, which should be
@@ -130,11 +136,26 @@ images on the figures using two different methods (the tested method and the
130136
baseline method). The decorator will arrange for setting up the figures and
131137
then collect the drawn results and compare them.
132138

133-
It is preferred that new tests use ``style='mpl20'`` as this leads to smaller
134-
figures and reflects the newer look of default Matplotlib plots. Also, if the
135-
texts (labels, tick labels, etc) are not really part of what is tested, use
136-
``remove_text=True`` as this will lead to smaller figures and reduce possible
137-
issues with font mismatch on different platforms.
139+
For example, this test compares two different methods to draw the same
140+
circle: plotting a circle using a `matplotlib.patches.Circle` patch
141+
vs plotting the circle using the parametric equation of a circle ::
142+
143+
from matplotlib.testing.decorators import check_figures_equal
144+
import matplotib.patches as mpatches
145+
import matplotlib.pyplot as plt
146+
import numpy as np
147+
148+
@check_figures_equal(extensions=['png'], tol=100)
149+
def test_parametric_circle_plot(fig_test, fig_ref):
150+
red_circle_ref = mpatches.Circle((0, 0), 0.2, color='r', clip_on=False)
151+
fig_ref.add_artist(red_circle_ref)
152+
theta = np.linspace(0, 2 * np.pi, 150)
153+
radius = 0.4
154+
fig_test.plot(radius * np.cos(theta), radius * np.sin(theta), color='r')
155+
156+
Both comparison decorators have a tolerance argument ``tol`` that is used to specify the
157+
tolerance for difference in color value between the two images, where 255 is the maximal
158+
difference. The test fails if the average pixel difference is greater than this value.
138159

139160
See the documentation of `~matplotlib.testing.decorators.image_comparison` and
140161
`~matplotlib.testing.decorators.check_figures_equal` for additional information
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
.. _github-stats-3-7-3:
2+
3+
GitHub statistics for 3.7.3 (Sep 11, 2023)
4+
==========================================
5+
6+
GitHub statistics for 2023/07/05 (tag: v3.7.2) - 2023/09/11
7+
8+
These lists are automatically generated, and may be incomplete or contain duplicates.
9+
10+
We closed 14 issues and merged 48 pull requests.
11+
The full list can be seen `on GitHub <https://github.com/matplotlib/matplotlib/milestone/82?closed=1>`__
12+
13+
The following 17 authors contributed 130 commits.
14+
15+
* amiraflak
16+
* Amirreza Aflakparast
17+
* dependabot[bot]
18+
* Elliott Sales de Andrade
19+
* Greg Lucas
20+
* hannah
21+
* Haoying Zhang
22+
* Jody Klymak
23+
* Kritika Verma
24+
* Kyle Sunden
25+
* marbled-toast
26+
* Mateusz Sokół
27+
* Matthew Feickert
28+
* Oscar Gustafsson
29+
* Ruth Comer
30+
* Thomas A Caswell
31+
* Tim Hoffmann
32+
33+
GitHub issues and pull requests:
34+
35+
Pull Requests (48):
36+
37+
* :ghpull:`26725`: Backport PR #26719 on branch v3.7.x (Fix issue with missing attribute in Path3DCollection)
38+
* :ghpull:`26723`: Backport PR #26721 on branch v3.7.x (Add a Python 3.12 classifier)
39+
* :ghpull:`26719`: Fix issue with missing attribute in Path3DCollection
40+
* :ghpull:`26721`: Add a Python 3.12 classifier
41+
* :ghpull:`26672`: Backport cibuildwheel updates to v3.7.x
42+
* :ghpull:`26706`: Pin NumPy below v2 for 3.7.x
43+
* :ghpull:`26653`: Backport PR #26597 on branch v3.7.x (Squeeze post-converted values when validating limits)
44+
* :ghpull:`26597`: Squeeze post-converted values when validating limits
45+
* :ghpull:`26582`: MNT: Enable wheels for Python 3.12
46+
* :ghpull:`26616`: Backport PR #26598 on branch v3.7.x (FIX: array labelcolor for Tick)
47+
* :ghpull:`26598`: FIX: array labelcolor for Tick
48+
* :ghpull:`26610`: Backport PR #26538 on branch v3.7.x (Resolves #26421 Added an example for fig comparison decorator)
49+
* :ghpull:`26538`: Resolves #26421 Added an example for fig comparison decorator
50+
* :ghpull:`26574`: Backport PR #26571 on branch v3.7.x ([Doc]: match 3D plot types with others)
51+
* :ghpull:`26571`: [Doc]: match 3D plot types with others
52+
* :ghpull:`26570`: Backport PR #26569 on branch v3.7.x (refactor: constant "ncols" to variables)
53+
* :ghpull:`26569`: refactor: constant "ncols" to variables
54+
* :ghpull:`26555`: Backport PR #26554 on branch v3.7.x (Remove NumPy abs overrides from pylab)
55+
* :ghpull:`26552`: Backport PR #26493: Disable ````add_html_cache_busting```` on Sphinx 7.1+
56+
* :ghpull:`26554`: Remove NumPy abs overrides from pylab
57+
* :ghpull:`26549`: Backport PR #26545 on branch v3.7.x (Fix size inferral when using cairocffi)
58+
* :ghpull:`26545`: Fix size inferral when using cairocffi
59+
* :ghpull:`26544`: Backport PR #26532: Fix input check in Poly3DCollection.__init__
60+
* :ghpull:`26532`: Fix input check in Poly3DCollection.__init__
61+
* :ghpull:`26459`: Backport PR #26458 on branch v3.7.x (Remove soon to be deprecated nan/inf aliases)
62+
* :ghpull:`26458`: Remove soon to be deprecated nan/inf aliases
63+
* :ghpull:`26455`: Backport PR #26452 on branch v3.7.x (ENH: Update numpy exceptions imports)
64+
* :ghpull:`26452`: ENH: Update numpy exceptions imports
65+
* :ghpull:`26439`: Backport PR #26436 on branch v3.7.x (DOC: Add a warning that ticks are not persistent)
66+
* :ghpull:`26432`: Backport PR #26431 on branch v3.7.x (MNT: Unpin pyparsing, xfail error message tests for pyparsing 3.1.0)
67+
* :ghpull:`26436`: DOC: Add a warning that ticks are not persistent
68+
* :ghpull:`26428`: Merge branch v3.7.2-doc into v3.7.x
69+
* :ghpull:`26431`: MNT: Unpin pyparsing, xfail error message tests for pyparsing 3.1.0
70+
* :ghpull:`26412`: Backport PR #26405 on branch v3.7.x (DOC: Clarify the difference between document and section references)
71+
* :ghpull:`26390`: Backport PR #26354 on branch v3.7.x (DOC: contourf antialiased default)
72+
* :ghpull:`26354`: DOC: contourf antialiased default
73+
* :ghpull:`26386`: Backport PR #26370 on branch v3.7.x (Update README.txt )
74+
* :ghpull:`26364`: Backport PR #26361 on branch v3.7.x (LIC: Update the license we bundle the colorbrewer colormap data with)
75+
* :ghpull:`26361`: LIC: Update the license we bundle the colorbrewer colormap data with
76+
* :ghpull:`26322`: Backport PR #26321 on branch v3.7.x (remove quote box from font_manager)
77+
* :ghpull:`26318`: Backport PR #26317 on branch v3.7.x (update the doc string for fancyarrowpatch to link to annotate)
78+
* :ghpull:`26317`: update the doc string for fancyarrowpatch to link to annotate
79+
* :ghpull:`26304`: Backport PR #26300 on branch v3.7.x (FIX: do not warn when calling tight_layout multiple times)
80+
* :ghpull:`26300`: FIX: do not warn when calling tight_layout multiple times
81+
* :ghpull:`26301`: Backport PR #26291 on branch v3.7.x (Get correct renderer for axes_grid1 inset axes with bbox_inches=tight)
82+
* :ghpull:`26298`: Backport PR #26195 on branch v3.7.x ([Doc] link style sheets reference to customization tutorial)
83+
* :ghpull:`26291`: Get correct renderer for axes_grid1 inset axes with bbox_inches=tight
84+
* :ghpull:`26267`: Backport PR #26266 on branch v3.7.x (DOC: Use consistent font for anatomy example)
85+
86+
Issues (14):
87+
88+
* :ghissue:`26732`: [ENH]: Parser errors should mention that commands do not exist
89+
* :ghissue:`26497`: [Bug]: AttributeError: 'Path3DCollection' object has no attribute '_offset_zordered' (possible regression)
90+
* :ghissue:`26588`: [Bug]: Tick class instantiation returns an error when labelcolor is a tuple
91+
* :ghissue:`26421`: [Doc]: demo testing comparison decorator
92+
* :ghissue:`26486`: [Doc]: match 3D plot types listings titles to other titles
93+
* :ghissue:`26560`: [Doc]: ncols parameter hard-coded
94+
* :ghissue:`26553`: [TST] Upcoming dependency test failures
95+
* :ghissue:`26523`: [Bug]: backend_cairo set_context() is broken for cairocffi
96+
* :ghissue:`26420`: Typo in Poly3DCollection constructor
97+
* :ghissue:`26152`: [Bug]: Pyparsing 3.1 breaks tests
98+
* :ghissue:`26336`: [Doc]: GPL compatibility
99+
* :ghissue:`19721`: head size of FancyArrowPatch is "invisibly small" by default
100+
* :ghissue:`26290`: [Bug]: calling fig.tight_layout multiple times
101+
* :ghissue:`26287`: [Bug]: Error while creating inset axes using ``mpl_toolkits.axes_grid1.inset_locator.inset_axes``

doc/users/project/citing.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ By version
2929
.. START OF AUTOGENERATED
3030
3131
32+
v3.7.3
33+
.. image:: ../../_static/zenodo_cache/8336761.svg
34+
:target: https://doi.org/10.5281/zenodo.8336761
3235
v3.7.2
3336
.. image:: ../../_static/zenodo_cache/8118151.svg
3437
:target: https://doi.org/10.5281/zenodo.8118151

doc/users/release_notes.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,22 @@ Release notes
1212
.. include:: release_notes_next.rst
1313

1414

15+
Version 3.8
16+
===========
17+
.. toctree::
18+
:maxdepth: 1
19+
20+
github_stats.rst
21+
1522
Version 3.7
1623
===========
1724
.. toctree::
1825
:maxdepth: 1
1926

2027
prev_whats_new/whats_new_3.7.0.rst
2128
../api/prev_api_changes/api_changes_3.7.0.rst
22-
github_stats.rst
29+
prev_whats_new/github_stats_3.7.3.rst
30+
prev_whats_new/github_stats_3.7.2.rst
2331
prev_whats_new/github_stats_3.7.1.rst
2432
prev_whats_new/github_stats_3.7.0.rst
2533

galleries/examples/color/named_colors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ def plot_colortable(colors, *, ncols=4, sort_colors=True):
4242
n = len(names)
4343
nrows = math.ceil(n / ncols)
4444

45-
width = cell_width * 4 + 2 * margin
45+
width = cell_width * ncols + 2 * margin
4646
height = cell_height * nrows + 2 * margin
4747
dpi = 72
4848

4949
fig, ax = plt.subplots(figsize=(width / dpi, height / dpi), dpi=dpi)
5050
fig.subplots_adjust(margin/width, margin/height,
5151
(width-margin)/width, (height-margin)/height)
52-
ax.set_xlim(0, cell_width * 4)
52+
ax.set_xlim(0, cell_width * ncols)
5353
ax.set_ylim(cell_height * (nrows-0.5), -cell_height/2.)
5454
ax.yaxis.set_visible(False)
5555
ax.xaxis.set_visible(False)

galleries/plot_types/3D/scatter3d_simple.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
==============
3-
3D scatterplot
4-
==============
2+
===================
3+
scatter(xs, ys, zs)
4+
===================
55
66
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`.
77
"""

galleries/plot_types/3D/surface3d_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
=====================
3-
3D surface
3+
plot_surface(X, Y, Z)
44
=====================
55
66
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface`.

galleries/plot_types/3D/trisurf3d_simple.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
======================
3-
Triangular 3D surfaces
4-
======================
2+
=====================
3+
plot_trisurf(x, y, z)
4+
=====================
55
66
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`.
77
"""

galleries/plot_types/3D/voxels_simple.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
==========================
3-
3D voxel / volumetric plot
4-
==========================
2+
=========================
3+
voxels([x, y, z], filled)
4+
=========================
55
66
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels`.
77
"""

galleries/plot_types/3D/wire3d_simple.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
=================
3-
3D wireframe plot
4-
=================
2+
=======================
3+
plot_wireframe(X, Y, Z)
4+
=======================
55
66
See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe`.
77
"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def make_release_tree(self, base_dir, files):
333333
"cycler>=0.10",
334334
"fonttools>=4.22.0",
335335
"kiwisolver>=1.0.1",
336-
"numpy>=1.21",
336+
"numpy>=1.21,<2",
337337
"packaging>=20.0",
338338
"pillow>=6.2.0",
339339
"pyparsing>=2.3.1",

tools/cache_zenodo_svg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def _get_xdg_cache_dir():
6363

6464
if __name__ == "__main__":
6565
data = {
66+
"v3.7.3": "8336761",
6667
"v3.7.2": "8118151",
6768
"v3.7.1": "7697899",
6869
"v3.7.0": "7637593",

0 commit comments

Comments
 (0)
0