8000 Merge branch 'matplotlib:main' into master · matplotlib/matplotlib@231bcc0 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 231bcc0

Browse files
authored
Merge branch 'matplotlib:main' into master
2 parents 6323796 + e9eb36d commit 231bcc0

File tree

142 files changed

+6149
-2857
lines changed

Some content is hidden

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

142 files changed

+6149
-2857
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
with:
5353
fetch-depth: 0
5454

55-
- uses: actions/setup-python@v3
55+
- uses: actions/setup-python@v4
5656
name: Install Python
5757
with:
5858
python-version: '3.8'

.github/workflows/nightlies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Install Python
18-
uses: actions/setup-python@v3
18+
uses: actions/setup-python@v4
1919
with:
2020
python-version: '3.x'
2121

.github/workflows/reviewdog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/checkout@v3
1010

1111
- name: Set up Python 3
12-
uses: actions/setup-python@v3
12+
uses: actions/setup-python@v4
1313
with:
1414
python-version: 3.8
1515

.github/workflows/tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ jobs:
4848
XVFB_RUN: xvfb-run -a
4949
- os: ubuntu-20.04
5050
python-version: '3.10'
51-
# Re-add this when extra dependencies have wheels.
52-
# extra-requirements: '-r requirements/testing/extra.txt'
51+
extra-requirements: '-r requirements/testing/extra.txt'
5352
XVFB_RUN: xvfb-run -a
5453
- os: macos-latest
5554
python-version: 3.8
@@ -61,7 +60,7 @@ jobs:
6160
fetch-depth: 0
6261

6362
- name: Set up Python ${{ matrix.python-version }}
64-
uses: actions/setup-python@v3
63+
uses: actions/setup-python@v4
6564
with:
6665
python-version: ${{ matrix.python-version }}
6766

.matplotlib-repo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The existence of this file signals that the code is a matplotlib source repo
2+
and not an installed version. We use this in __init__.py for gating version
3+
detection.

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ exclude: |
1313
)
1414
repos:
1515
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v4.2.0
16+
rev: v4.3.0
1717
hooks:
1818
- id: check-added-large-files
1919
- id: check-docstring-first
2020
- id: end-of-file-fixer
2121
exclude_types: [svg]
2222
- id: mixed-line-ending
23+
- id: name-tests-test
24+
args: ["--django"]
2325
- id: trailing-whitespace
2426
exclude_types: [svg]
2527
- repo: https://github.com/pycqa/flake8

doc/_static/mpl.css

Lines changed: 5 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
:root {
2+
--sd-color-primary: #11557C;
3+
--sd-color-primary-highlight: #003c63;
4+
}
5+
16
a {
27
color: #11557C;
38
text-decoration: none;
@@ -7,144 +12,10 @@ a:hover {
712
color: #CA7900;
813
}
914

10-
table.highlighttable {
11-
margin-left: 0.5em;
12-
}
13-
14-
table.highlighttable td {
15-
padding: 0 0.5em 0 0.5em;
16-
}
17-
1815
.simple li>p {
1916
margin: 0;
2017
}
2118

22-
div.responsive_screenshots {
23-
/* Horizontally centered */
24-
display: block;
25-
margin: auto;
26-
27-
/* Do not go beyond 1:1 scale (and ensure a 1x4 tight layout) */
28-
max-width: 640px; /* at most 4 x 1:1 subfig width */
29-
max-height: 120px; /* at most 1 x 1:1 subfig height */
30-
}
31-
32-
/* To avoid subfigure parts outside of the responsive_screenshots */
33-
/* element (see <https://stackoverflow.com/q/2062258/>) */
34-
span.clear_screenshots { clear: left; display: block; }
35-
36-
div.responsive_subfig{
37-
float: left;
38-
width: 25%; /* we want 4 subfigs in a row */
39-
40-
/* Include content, padding and border in width. This should */
41-
/* avoid having to use tricks like "width: 24.9999%" */
42-
box-sizing: border-box;
43-
}
44-
45-
div.responsive_subfig img {
46-
/* Horizontally centered */
47-
display: block;
48-
margin: auto;
49-
50-
/* Possible downscaling */
51-
max-width: 162px; /* at most 1 x 1:1 subfig width */
52-
max-height: 139px; /* at most 1 x 1:1 subfig height */
53-
54-
width: 100%;
55-
}
56-
57-
@media only screen and (max-width: 930px){
58-
/* The value of 1000px was handcrafted to provide a more or less */
59-
/* smooth transition between the 1x4 and the 2x2 layouts. It is */
60-
/* NB: it is slightly below 1024px: so one should still have a */
61-
/* row in a 1024x768 window */
62-
63-
div.responsive_screenshots {
64-
/* Do not go beyond 1:1 scale (and ensure a 2x2 tight layout) */
65-
max-width: 324px; /* at most 2 x 1:1 subfig width */
66-
max-height: 278px; /* at most 2 x 1:1 subfig height */
67-
}
68-
69-
div.responsive_subfig {
70-
width: 50%; /* we want 2 subfigs in a row */ 4E34
71-
}
72-
}
73-
74-
/* bullet boxes on main page */
75-
div.bullet-box-container {
76-
display: flex;
77-
flex-wrap: wrap;
78-
margin: 1em 0;
79-
}
80-
81-
div.bullet-box {
82-
flex-grow: 1;
83-
width: 28%;
84-
margin: 0.4em;
85-
padding: 0 1em;
86-
background: #eff9ff;
87-
}
88-
89-
div.bullet-box p:first-of-type {
90-
font-size: 1.4em;
91-
text-align: center;
92-
}
93-
94-
div.bullet-box ul {
95-
padding-left: 1.2em;
96-
}
97-
98-
div.bullet-box li {
99-
padding-left: 0.3em;
100-
margin-bottom: 0.3em;
101-
}
102-
103-
@media only screen and (max-width: 930px){
104-
div.bullet-box {
105-
flex: 0 0 90%;
106-
}
107-
}
108-
109-
/* community items on main page */
110-
div.box {
111-
display: flex;
112-
flex-flow: row wrap;
113-
}
114-
115-
div.box-item {
116-
flex: 0 0 45%;
117-
padding: 4px;
118-
margin: 8px 12px;
119-
}
120-
121-
div.box-item img {
122-
float: left;
123-
width: 30px;
124-
height: 30px;
125-
fill: #888;
126-
127-
}
128-
div.box-item p {
129-
margin: 0 0 0 50px;
130-
}
131-
132-
div.box-item ul {
133-
margin: 0 0 0 50px;
134-
padding-left: 20px;
135-
}
136-
137-
hr.box-sep {
138-
margin: 1em 2em;
139-
}
140-
141-
@media only screen and (max-width: 930px){
142-
div.box-item {
143-
flex: 0 0 90%;
144-
}
145-
}
146-
147-
14819
/* multi column TOC */
14920
.contents ul {
15021
list-style-type: none;
@@ -174,29 +45,6 @@ hr.box-sep {
17445
font-size: 1.0em;
17546
}
17647

177-
178-
.mpl-button {
179-
background: #11557C;
180-
font-weight: normal;
181-
display: inline-block;
182-
padding: 0 1em;
183-
line-height: 2.8;
184-
font-size: 16px;
185-
text-align: center;
186-
cursor: pointer;
187-
color: #fff;
188-
text-decoration: none;
189-
border-radius: 6px;
190-
z-index: 1;
191-
transition: background .25s ease;
192-
}
193-
194-
.mpl-button:hover, .mpl-button:active, .mpl-button:focus {
195-
background: #003c63;
196-
outline-color: #003c63;
197-
}
198-
199-
20048
/* Hide red ¶ between the thumbnail and caption in gallery
20149
20250
Due the way that sphinx-gallery floats its captions the perma-link
@@ -251,25 +99,6 @@ table.property-table td {
25199
margin: 2.75rem 0;
252100
}
253101

254-
.sidebar-donate .mpl-button {
255-
/* fix width to width of cheatsheet */
256-
width: 210px;
257-
}
258-
259-
/* Two columns for install code blocks */
260-
div.twocol {
261-
padding-left: 0;
262-
padding-right: 0;
263-
display: flex;
264-
gap: 20px;
265-
}
266-
267-
div.twocol > div {
268-
flex-grow: 1;
269-
padding: 0;
270-
margin: 0;
271-
}
272-
273102
/* Fix selection of parameter names; remove when fixed in the theme
274103
* https://github.com/sphinx-doc/sphinx/pull/9763
275104
*/

doc/_static/switcher.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
[
22
{
33
"name": "3.5 (stable)",
4-
"version": "stable"
4+
"version": "stable",
5+
"url": "https://matplotlib.org/stable"
56
},
67
{
78
"name": "3.6 (dev)",
8-
"version": "devdocs"
9+
"version": "devdocs",
10+
"url": "https://matplotlib.org/devdocs"
911
},
1012
{
1113
"name": "3.4",
12-
"version": "3.4.3"
14+
"version": "3.4.3",
15+
"url": "https://matplotlib.org/3.4.3"
1316
},
1417
{
1518
"name": "3.3",
16-
"version": "3.3.4"
19+
"version": "3.3.4",
20+
"url": "https://matplotlib.org/3.3.4"
1721
},
1822
{
1923
"name": "2.2",
20-
"version": "2.2.4"
24+
"version": "2.2.4",
25+
"url": "https://matplotlib.org/2.2.4"
2126
}
2227
]

doc/_templates/donate_sidebar.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
2-
3-
41
<div class="sidebar-donate">
5-
<a href="https://numfocus.org/donate-to-matplotlib" target="_blank">
6-
<span class="mpl-button" >Support Matplotlib</span>
2+
<a class="sd-btn sd-btn-primary sd-fs-5 sd-px-5 sd-py-2" href="https://numfocus.org/donate-to-matplotlib" target="_blank">
3+
Support Matplotlib
74
</a>
85
</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
No need to specify renderer for get_tightbbox and get_window_extent
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The ``get_tightbbox`` and `~.Artist.get_window_extent` methods
5+
no longer require the *renderer* kwarg, saving users from having to
6+
querry it from ``fig.canvas.get_renderer``. If the *renderer*
7+
kwarg is not supplied these methods first check if there is a cached renderer
8+
from a previous draw and use that. If there is no cahched renderer, then
9+
the methods will use ``fig.canvas.get_renderer()`` as a fallback.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``get_ticklabels`` now always populates labels
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Previously `.Axis.get_ticklabels` (and `.Axes.get_xticklabels`,
4+
`.Axes.get_yticklabels`) would only return empty strings unless a draw had
5+
already been performed. Now the ticks and their labels are updated when the
6+
labels are requested.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Default date limits changed to 1970-01-01 to 1970-01-02
2+
-------------------------------------------------------
3+
4+
Previously the default limits for an empty axis set up for dates
5+
(`.Axis.axis_date`) was 2000-01-01 to 2010-01-01. This has been
6+
changed to 1970-01-01 to 1970-01-02. With the default epoch, this
7+
makes the numeric limit for date axes the same as for other axes
8+
(0.0-1.0), and users are less likely to set a locator with far too
9+
many ticks.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Modifications to the Groupers returned by ``get_shared_x_axes`` and ``get_shared_y_axes``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... are deprecated. In the future, these methods will return immutable views
4+
on the grouper structures. Note that previously, calling e.g. ``join()``
5+
would already fail to set up the correct structures fo 10000 r sharing axes; use
6+
`.Axes.sharex` or `.Axes.sharey` instead.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The *math* parameter of ``mathtext.get_unicode_index``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
In math mode, ASCII hyphens (U+002D) are now replaced by unicode minus signs
5+
(U+2212) at the parsing stage.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Methods to set parameters in ``LogLocator`` and ``LogFormatter*``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
In `~.LogFormatter` and derived subclasses, the methods ``base`` and
5+
``label_minor`` for setting the respective parameter are deprecated and
6+
replaced by ``set_base`` and ``set_label_minor``, respectively.
7+
8+
In `~.LogLocator`, the methods ``base`` and ``subs`` for setting the
9+
respective parameter are deprecated. Instead, use
10+
``set_params(base=..., subs=...)``.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
``checkdep_usetex`` deprecated
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
This method was only intended to disable tests in case no latex install was
5+
found. As such, it is considered to be private and for internal use only.
6+
7+
Please vendor the code if you need this.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Positional arguments in Artist constructors
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Passing all but the very few first arguments positionally in the constructors
5+
of Artists is deprecated. Most arguments will become keyword-only in a future
6+
version.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Unused methods in ``Axis``, ``Tick``, ``XAxis``, and ``YAxis``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The following methods are no longer used and deprecated without a replacement::
5+
6+
- ``Axis.get_ticklabel_extents``
7+
- ``Tick.get_pad_pixels``
8+
- ``XAxis.get_text_heights``
9+
- ``YAxis.get_text_widths``

0 commit comments

Comments
 (0)
0