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

Skip to content

Commit 427c2fb

Browse files
Merge branch 'master' of https://github.com/xordux/matplotlib into navigate_mode_18151
2 parents f7640d9 + fc35fc8 commit 427c2fb

File tree

203 files changed

+4900
-4399
lines changed

Some content is hidden

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

203 files changed

+4900
-4399
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
Matplotlib follows the Python Software Foundation Code of Conduct in everything we do,
22
see https://www.python.org/psf/conduct/.
3+
4+
Report violations to [email protected], which is checked by Hannah Aizenman (@story645) and Thomas Caswell (@tacaswell).
5+
6+
You can also use the NumFocus Code of Conduct [Reporting Form](https://numfocus.typeform.com/to/ynjGdT).

.github/workflows/cibuildwheel.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
CIBW_SKIP: "cp35-* cp36-*"
4343
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
4444
CIBW_MANYLINUX_I686_IMAGE: manylinux1
45-
CIBW_BEFORE_BUILD: pip install numpy==1.15
45+
CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
4646
MPL_DISABLE_FH4: "yes"
4747

4848
- name: Build wheels for CPython 3.6
@@ -52,7 +52,7 @@ jobs:
5252
CIBW_BUILD: "cp36-*"
5353
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
5454
CIBW_MANYLINUX_I686_IMAGE: manylinux1
55-
CIBW_BEFORE_BUILD: pip install numpy==1.15
55+
CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
5656
MPL_DISABLE_FH4: "yes"
5757
if: >
5858
startsWith(github.ref, 'refs/heads/v3.3') ||
@@ -63,7 +63,7 @@ jobs:
6363
python -m cibuildwheel --output-dir dist
6464
env:
6565
CIBW_BUILD: "pp3?-*"
66-
CIBW_BEFORE_BUILD: pip install numpy==1.15
66+
CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
6767
if: >
6868
runner.os != 'Windows' && (
6969
startsWith(github.ref, 'refs/heads/v3.3') ||

SECURITY.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The following table lists versions and whether they are supported. Security
6+
vulnerability reports will be accepted and acted upon for all supported
7+
versions.
8+
9+
| Version | Supported |
10+
| ------- | ------------------ |
11+
| 3.3.x | :white_check_mark: |
12+
| 3.2.x | :white_check_mark: |
13+
| 3.1.x | :x: |
14+
| 3.0.x | :x: |
15+
| 2.2.x | :white_check_mark: |
16+
| < 2.2 | :x: |
17+
18+
## Reporting a Vulnerability
19+
20+
If you have found a security vulnerability, in order to keep it confidential,
21+
please do not report an issue on GitHub.
22+
23+
Please email us details of the vulnerability at [email protected];
24+
include a description and proof-of-concept that is [short and
25+
self-contained](http://www.sscce.org/).
26+
27+
You should expect a response within a week of your email. Depending on the
28+
severity of the issue, this may require some time to draft an immediate bugfix
29+
release. Less severe issues may be held until the next release.
30+
31+
We do not award bounties for security vulnerabilities.

doc/_static/mpl.css

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ dt:target,
162162
background-color: #ffffee;
163163
}
164164

165-
dl.glossary dt {
166-
font-weight: bold;
167-
font-size: 1.1em;
168-
}
169-
170165
pre a {
171166
color: inherit;
172167
text-decoration: none;
@@ -245,20 +240,6 @@ div.sphinxsidebar {
245240
/* margin-left: -100%; */
246241
}
247242

248-
div.sphinxsidebar h4, div.sphinxsidebar h3 {
249-
margin: 1em 0 0.5em 0;
250-
font-size: 0.9em;
251-
padding: 0.1em 0 0.1em 0.5em;
252-
color: white;
253-
border: 1px solid #86989B;
254-
background-color: #AFC1C4;
255-
}
256-
257-
div.sphinxsidebar h3 a {
258-
/* workaround for table of contents heading, which is a link */
259-
color: white !important;
260-
}
261-
262243
div.sphinxsidebar ul {
263244
padding-left: 1.5em;
264245
margin-top: 10px;

doc/api/axis_api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ Data and view intervals
121121

122122
Axis.get_data_interval
123123
Axis.get_view_interval
124+
Axis.get_inverted
124125
Axis.set_data_interval
125126
Axis.set_view_interval
127+
Axis.set_inverted
126128

127129
Rendering helpers
128130
-----------------

doc/api/figure_api.rst

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,5 @@
55
.. currentmodule:: matplotlib.figure
66

77
.. automodule:: matplotlib.figure
8-
:no-members:
9-
:no-inherited-members:
10-
11-
Classes
12-
-------
13-
14-
.. autosummary::
15-
:toctree: _as_gen/
16-
:template: autosummary.rst
17-
:nosignatures:
18-
19-
Figure
20-
SubplotParams
21-
22-
Functions
23-
---------
24-
25-
.. autosummary::
26-
:toctree: _as_gen/
27-
:template: autosummary.rst
28-
:nosignatures:
29-
30-
figaspect
8+
:members:
9+
:inherited-members:

doc/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ Matplotlib consists of the following submodules:
119119
texmanager_api.rst
120120
textpath_api.rst
121121
ticker_api.rst
122+
tight_bbox_api.rst
122123
tight_layout_api.rst
123124
transformations.rst
124125
tri_api.rst
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Raise or warn on registering a colormap twice
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
When using `matplotlib.cm.register_cmap` to register a user provided
5+
or third-party colormap it will now raise a `ValueError` if trying to
6+
over-write one of the built in colormaps and warn if trying to over
7+
write a user registered colormap. This may raise for user-registered
8+
colormaps in the future.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
GTK/Tk key name changes
2+
~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The handling of non-ASCII keypresses (as reported in the KeyEvent passed to
5+
``key_press_event``-handlers) in the GTK and Tk backends now correctly reports
6+
Unicode characters (e.g., €), and better respects NumLock on the numpad.
7+
8+
The following key names have changed; the new names are consistent with those
9+
reported by the Qt backends:
10+
11+
- The "Break/Pause" key (keysym 0xff13) is now reported as "pause" instead of
12+
"break" (this is also consistent with the X key name).
13+
- The numpad "delete" key is now reported as "delete" instead of "dec".
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Axes3D no longer adds itself to figure
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
New `.Axes3D` objects previously added themselves to figures when they were
5+
created, which lead to them being added twice if
6+
``fig.add_subplot(111, projection='3d')`` was called. Now ``ax = Axes3d(fig)``
7+
will need to be explicitly added to the figure with ``fig.add_axes(ax)``, as
8+
also needs to be done for normal `.axes.Axes`.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Changed cursive and fantasy font definitions
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
The Comic Sans and Comic Neue fonts were moved from the default :rc:`font.fantasy`
4+
list to the default :rc:`font.cursive` setting, in accordance with the CSS
5+
font families example_ and in order to provide a cursive font present in
6+
Microsoft's Core Fonts set.
7+
8+
.. _example: https://www.w3.org/Style/Examples/007/fonts.en.html
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BoxStyles are now called without passing the *mutation_aspect* parameter
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Mutation aspect is now handled by the artist itself. Hence the
4+
*mutation_aspect* parameter of ``BoxStyle._Base.__call__`` is deprecated, and
5+
custom boxstyles should be implemented to not require this parameter (it can be
6+
left as a parameter defaulting to 1 for back-compatibility).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
``ColorbarPatch`` and ``colorbar_factory`` are deprecated
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
All the relevant functionality has been moved to the
4+
`~matplotlib.colorbar.Colorbar` class.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Subplot-related attributes and methods
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Some ``SubplotBase`` methods and attributes have been deprecated and/or moved
4+
to `.SubplotSpec`: ``get_geometry`` (use `.SubplotBase.get_subplotspec`
5+
instead), ``change_geometry`` (use `.SubplotBase.set_subplotspec`
6+
instead), ``is_first_row``, ``is_last_row``, ``is_first_col``,
7+
``is_last_col`` (use the corresponding methods on the `.SubplotSpec`
8+
instance instead), ``update_params`` (now a no-op), ``figbox`` (use
9+
``ax.get_subplotspec().get_geometry(ax.figure)`` instead to recompute
10+
the geometry, or ``ax.get_position()`` to read its current value),
11+
``numRows``, ``numCols`` (use the ``nrows`` and ``ncols`` attribute on the
12+
`.GridSpec` instead). Likewise, the ``get_geometry``, ``change_geometry``,
13+
``update_params``, and ``figbox`` methods/attributes of `.SubplotDivider` have
14+
been deprecated, with similar replacements.
15+
16+
Axes constructor
17+
~~~~~~~~~~~~~~~~
18+
Parameters of the Axes constructor other than *fig* and *rect* will become
19+
keyword-only in a future version.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
``MathTextParser("bitmap")`` is deprecated
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The associated APIs ``MathtextBackendBitmap``, ``MathTextParser.to_mask``,
5+
``MathTextParser.to_rgba``, ``MathTextParser.to_png``, and
6+
``MathTextParser.get_depth`` are likewise deprecated.
7+
8+
To convert a text string to an image, either directly draw the text to an
9+
empty `.Figure` and save the figure using a tight bbox, as demonstrated in
10+
:doc:`/gallery/text_labels_and_annotations/mathtext_asarray`, or use
11+
`.mathtext.math_to_image`.
12+
13+
When using `.math_to_image`, text color can be set with e.g.::
14+
15+
with plt.rc_context({"text.color": "tab:blue"}):
16+
mathtext.math_to_image(text, filename)
17+
18+
and an RGBA array can be obtained with e.g.::
19+
20+
from io import BytesIO
21+
buf = BytesIO()
22+
mathtext.math_to_image(text, buf, format="png")
23+
buf.seek(0)
24+
rgba = plt.imread(buf)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``ParasiteAxesAuxTransBase.update_viewlim``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... is deprecated; use ``apply_aspect`` instead.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ParasiteAxesAuxTransBase
2+
~~~~~~~~~~~~~~~~~~~~~~~~
3+
The functionality of that mixin class has been moved to the base
4+
``ParasiteAxesBase`` class. Thus, ``ParasiteAxesAuxTransBase``,
5+
``ParasiteAxesAuxTrans``, and ``parasite_axes_auxtrans_class_factory`` are
6+
deprecated.
7+
8+
In general, it is suggested to use ``HostAxes.get_aux_axes`` to create
9+
parasite axes, as this saves the need of manually appending the parasite
10+
to ``host.parasites`` and makes sure that their ``remove()`` method works
11+
properly.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``backend_pgf.TmpDirCleaner``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... is deprecated, with no replacement.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
wx backend cleanups
2+
~~~~~~~~~~~~~~~~~~~
3+
The *origin* parameter to ``_FigureCanvasWxBase.gui_repaint`` is deprecated
4+
with no replacement; ``gui_repaint`` now automatically detects the case where
5+
it is used with the wx renderer.
6+
7+
The ``NavigationToolbar2Wx.get_canvas`` method is deprecated; directly
8+
instantiate a canvas (``FigureCanvasWxAgg(frame, -1, figure)``) if needed.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
``sphinext.plot_directive.align``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... is deprecated. Use ``docutils.parsers.rst.directives.images.Image.align``
4+
instead.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FigureBase class added, and Figure class made a child
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The new subfigure feature motivated some re-organization of the
5+
`.figure.Figure` class, so that the new `.figure.SubFigure` class could have
6+
all the capabilities of a figure.
7+
8+
The `.figure.Figure` class is now a subclass of `.figure.FigureBase`, where
9+
`.figure.FigureBase` contains figure-level artist addition routines, and
10+
the `.figure.Figure` subclass just contains features that are unique to the
11+
outer figure.
12+
13+
Note that there is a new *transSubfigure* transform
14+
associated with the subfigure. This transform also exists for a
15+
`.Figure` instance, and is equal to *transFigure* in that case,
16+
so code that uses the transform stack that wants to place objects on either
17+
the parent figure or one of the subfigures should use *transSubfigure*.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sample_data removals
2+
~~~~~~~~~~~~~~~~~~~~
3+
The sample datasets listed below have been removed. Suggested replacements for
4+
demonstration purposes are listed in parentheses.
5+
- ``None_vs_nearest-pdf.png``,
6+
- ``aapl.npz`` (use ``goog.npz``),
7+
- ``ada.png``, ``grace_hopper.png`` (use ``grace_hopper.jpg``),
8+
- ``ct.raw.gz`` (use ``s1045.ima.gz``),
9+
- ``damodata.csv`` (use ``msft.csv``).

doc/api/prev_api_changes/api_changes_2.0.1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ line width the final patterns would not change.
5555
There is no way to restore the old behavior.
5656

5757

58-
Deprecate 'Vega' color maps
59-
---------------------------
58+
Deprecate 'Vega' colormaps
59+
--------------------------
6060

6161
The "Vega" colormaps are deprecated in Matplotlib 2.0.1 and will be
6262
removed in Matplotlib 2.2. Use the "tab" colormaps instead: "tab10",

doc/api/prev_api_changes/api_changes_2.2.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ The ``Axes.get_axis_bgcolor``, ``Axes.set_axis_bgcolor``,
110110
The unused ``FONT_SCALE`` and ``fontd`` attributes of the `.RendererSVG`
111111
class have been removed.
112112

113-
color maps
114-
~~~~~~~~~~
113+
colormaps
114+
~~~~~~~~~
115115

116116
The ``spectral`` colormap has been removed. The ``Vega*`` colormaps, which
117117
were aliases for the ``tab*`` colormaps, have been removed.

0 commit comments

Comments
 (0)