Skip to content

Commit bb290c2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into add_mosaic_row_col
2 parents 0e7dc0e + 5d5700a commit bb290c2

File tree

202 files changed

+14044
-2611
lines changed

Some content is hidden

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

202 files changed

+14044
-2611
lines changed

.devcontainer/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
curl micro.mamba.pm/install.sh | bash
5+
"${SHELL}" <(curl -Ls micro.mamba.pm/install.sh) < /dev/null
66

77
conda init --all
88
micromamba shell init -s bash

.github/workflows/cibuildwheel.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,18 @@ jobs:
9191
runs-on: ${{ matrix.os }}
9292
env:
9393
CIBW_BEFORE_BUILD: >-
94-
pip install certifi oldest-supported-numpy &&
94+
pip install certifi numpy>=1.25 &&
9595
rm -rf {package}/build
9696
CIBW_BEFORE_BUILD_WINDOWS: >-
97-
pip install certifi delvewheel oldest-supported-numpy &&
97+
pip install certifi delvewheel numpy>=1.25 &&
9898
rm -rf {package}/build
9999
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
100100
delvewheel repair -w {dest_dir} {wheel}
101101
CIBW_AFTER_BUILD: >-
102102
twine check {wheel} &&
103103
python {package}/ci/check_wheel_licenses.py {wheel}
104104
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
105-
CIBW_SKIP: "*-musllinux*"
105+
CIBW_SKIP: "*-musllinux_aarch64"
106106
CIBW_TEST_COMMAND: >-
107107
python {package}/ci/check_version_number.py
108108
# Apple Silicon machines are not available for testing, so silence the

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ jobs:
313313
314314
- name: Filter C coverage
315315
run: |
316-
lcov --capture --directory . --output-file coverage.info
317-
lcov --output-file coverage.info \
316+
lcov --rc lcov_branch_coverage=1 --capture --directory . --output-file coverage.info
317+
lcov --rc lcov_branch_coverage=1 --output-file coverage.info \
318318
--extract coverage.info $PWD/src/'*' $PWD/lib/'*'
319-
lcov --list coverage.info
319+
lcov --rc lcov_branch_coverage=1 --list coverage.info
320320
find . -name '*.gc*' -delete
321321
if: ${{ runner.os != 'macOS' }}
322322
- name: Upload code coverage

ci/mypy-stubtest-allowlist.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ matplotlib.pylab.*
55
matplotlib._.*
66
matplotlib.rcsetup._listify_validator
77
matplotlib.rcsetup._validate_linestyle
8-
matplotlib.ft2font.*
8+
matplotlib.ft2font.Glyph
99
matplotlib.testing.jpl_units.*
1010
matplotlib.sphinxext.*
1111

@@ -54,26 +54,14 @@ matplotlib.cm.register_cmap
5454
matplotlib.cm.unregister_cmap
5555
matplotlib.collections.PolyCollection.span_where
5656
matplotlib.gridspec.GridSpecBase.get_grid_positions
57-
matplotlib.widgets.Lasso.__init__
58-
matplotlib.widgets.PolygonSelector.__init__
59-
matplotlib.widgets.Slider.__init__
60-
matplotlib.widgets.RangeSlider.__init__
61-
matplotlib.widgets.TextBox.__init__
62-
matplotlib.widgets.Cursor.__init__
63-
matplotlib.widgets.SpanSelector.__init__
64-
matplotlib.widgets.ToolLineHandles.__init__
65-
matplotlib.widgets.ToolHandles.__init__
66-
matplotlib.widgets.LassoSelector.__init__
6757
matplotlib.widgets.MultiCursor.needclear
6858

6959
# 3.8 deprecations
70-
matplotlib.axes._base._AxesBase.get_tightbbox
7160
matplotlib.cbook.get_sample_data
7261
matplotlib.contour.ContourSet.allkinds
7362
matplotlib.contour.ContourSet.allsegs
7463
matplotlib.contour.ContourSet.tcolors
7564
matplotlib.contour.ContourSet.tlinewidths
76-
matplotlib.figure.FigureBase.get_tightbbox
7765
matplotlib.ticker.LogLocator.__init__
7866
matplotlib.ticker.LogLocator.set_params
7967

doc/_static/image-rotator.js

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

doc/api/index.rst

Lines changed: 25 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,44 @@
11
API Reference
22
=============
33

4-
When using the library you will typically create
5-
:doc:`Figure <figure_api>` and :doc:`Axes <axes_api>` objects and
6-
call their methods to add content and modify the appearance.
4+
Matplotlib interfaces
5+
---------------------
76

8-
- :mod:`matplotlib.figure`: axes creation, figure-level content
9-
- :mod:`matplotlib.axes`: most plotting methods, Axes labels, access to axis
10-
styling, etc.
7+
Matplotlib provides two different interfaces:
118

12-
Example: We create a Figure ``fig`` and Axes ``ax``. Then we call
13-
methods on them to plot data, add axis labels and a figure title.
9+
- **Axes interface**: create a `.Figure` and one or more `~.axes.Axes` objects
10+
(typically using `.pyplot.subplots`), then *explicitly* use methods on these objects
11+
to add data, configure limits, set labels etc.
12+
- **pyplot interface**: consists of functions in the `.pyplot` module. Figure and Axes
13+
are manipulated through these functions and are only *implicitly* present in the
14+
background.
1415

15-
.. plot::
16-
:include-source:
17-
:align: center
16+
See :ref:`api_interfaces` for a more detailed description of both and their recommended
17+
use cases.
1818

19-
import matplotlib.pyplot as plt
20-
import numpy as np
19+
.. grid:: 1 1 2 2
20+
:padding: 0 0 1 1
2121

22-
x = np.arange(0, 4, 0.05)
23-
y = np.sin(x*np.pi)
22+
.. grid-item-card::
2423

25-
fig, ax = plt.subplots(figsize=(3,2), constrained_layout=True)
26-
ax.plot(x, y)
27-
ax.set_xlabel('t [s]')
28-
ax.set_ylabel('S [V]')
29-
ax.set_title('Sine wave')
30-
fig.set_facecolor('lightsteelblue')
24+
**Axes interface** (object-based, explicit)
25+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3126

27+
API:
3228

29+
- `~.pyplot.subplots`: create Figure and Axes
30+
- :mod:`~matplotlib.axes`: add data, limits, labels etc.
31+
- `.Figure`: for figure-level methods
3332

34-
.. _usage_patterns:
33+
.. grid-item-card::
3534

36-
Usage patterns
37-
--------------
35+
**pyplot interface** (function-based, implicit)
36+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3837

39-
Below we describe several common approaches to plotting with Matplotlib. See
40-
:ref:`api_interfaces` for an explanation of the trade-offs between the supported user
41-
APIs.
38+
API:
4239

40+
- `matplotlib.pyplot`
4341

44-
The explicit API
45-
^^^^^^^^^^^^^^^^
46-
47-
At its core, Matplotlib is an object-oriented library. We recommend directly
48-
working with the objects if you need more control and customization of your
49-
plots.
50-
51-
In many cases you will create a `.Figure` and one or more
52-
`~matplotlib.axes.Axes` using `.pyplot.subplots` and from then on only work
53-
on these objects. However, it's also possible to create `.Figure`\ s
54-
explicitly (e.g. when including them in GUI applications).
55-
56-
Further reading:
57-
58-
- `matplotlib.axes.Axes` and `matplotlib.figure.Figure` for an overview of
59-
plotting functions.
60-
- Most of the :ref:`examples <examples-index>` use the object-oriented approach
61-
(except for the pyplot section)
62-
63-
64-
The implicit API
65-
^^^^^^^^^^^^^^^^
66-
67-
`matplotlib.pyplot` is a collection of functions that make
68-
Matplotlib work like MATLAB. Each pyplot function makes some change to a
69-
figure: e.g., creates a figure, creates a plotting area in a figure, plots
70-
some lines in a plotting area, decorates the plot with labels, etc.
71-
72-
`.pyplot` is mainly intended for interactive plots and simple cases of
73-
programmatic plot generation.
74-
75-
Further reading:
76-
77-
- The `matplotlib.pyplot` function reference
78-
- :ref:`pyplot_tutorial`
79-
- :ref:`Pyplot examples <pyplots_examples>`
8042

8143
.. _api-index:
8244

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
PostScript paper type adds option to use figure size
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The :rc:`ps.papertype` rcParam can now be set to ``'figure'``, which will use
5+
a paper size that corresponds exactly with the size of the figure that is being
6+
saved.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
``allsegs``, ``allkinds``, ``tcolors`` and ``tlinewidths`` attributes of `.ContourSet`
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
These attributes are deprecated; if required, directly retrieve the vertices
4-
and codes of the Path objects in ``QuadContourSet.collections`` and the colors
5-
and the linewidths of these collections.
4+
and codes of the Path objects from ``ContourSet.get_paths()`` and the colors
5+
and the linewidths via ``ContourSet.get_facecolor()``, ``ContourSet.get_edgecolor()``
6+
and ``ContourSet.get_linewidths()``.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Automatic papersize selection in PostScript
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Setting :rc:`ps.papersize` to ``'auto'`` or passing ``papersize='auto'`` to
5+
`.Figure.savefig` is deprecated. Either pass an explicit paper type name, or
6+
omit this parameter to use the default from the rcParam.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Passing non-int or sequence of non-int to ``Table.auto_set_column_width``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Column numbers are ints, and formerly passing any other type was effectively
5+
ignored. This will become an error in the future.

0 commit comments

Comments
 (0)