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

Skip to content

Commit d9fd08d

Browse files
committed
Merge remote-tracking branch 'matplotlib/v2.2.x'
Conflicts: MANIFEST.in - keep changes from 2.2.x branch doc/users/whats_new.rst - keep master branch version lib/matplotlib/animation.py - keep master branch version of dropping () in FFMpegWriter lib/matplotlib/backends/backend_wxagg.py - keep master branch version which removes deprecated class lib/matplotlib/figure.py - keep master branch version of tight_layout parameter definition - keep master branch version of get_tight_layout docstring lib/matplotlib/image.py - keep master branch version of indentation lib/matplotlib/testing/jpl_units/EpochConverter.py - keep indentation from master branch lib/matplotlib/testing/jpl_units/__init__.py - keep indentation from master branch matplotlibrc.template - keep master branch version of backend instructions - keep master branch version pgf parameter section as the debug rcparams has been removed on the master branch
2 parents ebe50c1 + 3dd8f18 commit d9fd08d

File tree

9 files changed

+60
-42
lines changed

9 files changed

+60
-42
lines changed

MANIFEST.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
include INSTALL.rst README.rst
2-
include CONTRIBUTING.md
32
include pytest.ini
4-
include Makefile MANIFEST.in
3+
include MANIFEST.in
54
include matplotlibrc.template setup.cfg.template
6-
include setupext.py setup.py distribute_setup.py
5+
include setupext.py setup.py
6+
include lib/matplotlib/mpl-data/lineprops.glade
77
include lib/matplotlib/mpl-data/matplotlibrc
88
include lib/matplotlib/mpl-data/images/*
99
include lib/matplotlib/mpl-data/fonts/ttf/*

doc/api/api_changes.rst

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,28 @@ out what caused the breakage and how to fix it by updating your code.
1010
For new features that were added to Matplotlib, please see
1111
:ref:`whats-new`.
1212

13+
.. for a release comment out the toctree below
14+
15+
16+
.. toctree::
17+
:glob:
18+
:maxdepth: 1
19+
20+
next_api_changes/*
21+
22+
1323
API Changes in 2.2.0
1424
====================
1525

16-
..
1726

18-
.. toctree::
19-
:glob:
20-
:maxdepth: 1
2127

22-
next_api_changes/*
28+
New dependency
29+
--------------
30+
31+
`kiwisolver <https://github.com/nucleic/kiwi>`__ is now a required
32+
dependency to support the new constrained_layout, see
33+
:ref:`sphx_glr_tutorials_intermediate_constrainedlayout_guide.py` for
34+
more details.
2335

2436

2537
Deprecations
@@ -80,6 +92,10 @@ transparency of figure patches in the nbagg (or any other) backend,
8092
directly set ``figure.patch.facecolor``, or the ``figure.facecolor``
8193
rcParam.
8294

95+
Deprecated `Axis.unit_data`
96+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
97+
98+
Use `Axis.units` (which has long existed) instead.
8399

84100

85101
Removals
@@ -136,6 +152,12 @@ The following deprecated rcParams have been removed:
136152

137153

138154

155+
Only accept string-like for Categorical input
156+
---------------------------------------------
157+
158+
Do not accept mixed string / float / int input, only
159+
strings are valid categoricals.
160+
139161
Removal of unused imports
140162
-------------------------
141163
Many unused imports were removed from the codebase. As a result,
@@ -144,6 +166,13 @@ trying to import certain classes or functions from the "wrong" module
144166
:mod:`matplotlib.figure`) will now raise an `ImportError`.
145167

146168

169+
``Axes3D.get_xlim``, ``get_ylim`` and ``get_zlim`` now return a tuple
170+
---------------------------------------------------------------------
171+
172+
They previously returned an array. Returning a tuple is consistent with the
173+
behavior for 2D axes.
174+
175+
147176
Exception type changes
148177
----------------------
149178

@@ -261,14 +290,6 @@ and ::
261290

262291

263292

264-
New dependency
265-
--------------
266-
267-
`kiwisolver <https://github.com/nucleic/kiwi>`__ is now a required
268-
dependency to support the new constrained_layout, see
269-
:ref:`sphx_glr_tutorials_intermediate_constrainedlayout_guide.py` for
270-
more details.
271-
272293

273294
`Axes.imshow` clips RGB values to the valid range
274295
-------------------------------------------------

doc/api/next_api_changes/2018-02-10-HA.rst

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

doc/citing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ publication, please acknowledge this fact by citing `Hunter et al (2007)
2727
2828
DOIs
2929
----
30+
v2.2.0
31+
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1189358.svg
32+
:target: https://doi.org/10.5281/zenodo.1189358
33+
v2.1.2
34+
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1154287.svg
35+
:target: https://doi.org/10.5281/zenodo.1154287
3036
v2.1.1
3137
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1098480.svg
3238
:target: https://doi.org/10.5281/zenodo.1098480

lib/matplotlib/tests/test_units.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from matplotlib.testing.decorators import image_comparison
77
import matplotlib.units as munits
88
import numpy as np
9+
import datetime
910

1011

1112
# Basic class that wraps numpy array and has units

matplotlibrc.template

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ backend : $TEMPLATE_BACKEND
326326
## color cycle for plot lines as list of string
327327
## colorspecs: single letter, long name, or web-style hex
328328
## Note the use of string escapes here ('1f77b4', instead of 1f77b4)
329-
## as opposed to the rest of this file.
329+
## as opposed to the rest of this file.
330330
#axes.autolimit_mode : data ## How to scale axes limits to the data.
331331
## Use "data" to use data limits, plus some margin
332332
## Use "round_number" move to the nearest "round" number
@@ -450,11 +450,11 @@ backend : $TEMPLATE_BACKEND
450450
## using `tight_layout`
451451
#figure.constrained_layout.use: False ## When True, automatically make plot
452452
## elements fit on the figure. (Not compatible
453-
## with `autolayout`, above).
454-
#figure.constrained_layout.h_pad : 0.04167 ## Padding around axes objects. Float representing
453+
## with `autolayout`, above).
454+
#figure.constrained_layout.h_pad : 0.04167 ## Padding around axes objects. Float representing
455455
#figure.constrained_layout.w_pad : 0.04167 ## inches. Default is 3./72. inches (3 pts)
456-
#figure.constrained_layout.hspace : 0.02 ## Space between subplot groups. Float representing
457-
#figure.constrained_layout.wspace : 0.02 ## a fraction of the subplot widths being separated.
456+
#figure.constrained_layout.hspace : 0.02 ## Space between subplot groups. Float representing
457+
#figure.constrained_layout.wspace : 0.02 ## a fraction of the subplot widths being separated.
458458

459459
#### IMAGES
460460
#image.aspect : equal ## equal | auto | a number
@@ -493,12 +493,12 @@ backend : $TEMPLATE_BACKEND
493493
## It may cause minor artifacts, though.
494494
## A value of 20000 is probably a good
495495
## starting point.
496-
#### PATHS
496+
#### PATHS
497497
#path.simplify : True ## When True, simplify paths by removing "invisible"
498498
## points to reduce file size and increase rendering
499499
## speed
500500
#path.simplify_threshold : 0.111111111111 ## The threshold of similarity below which
501-
## vertices will be removed in the
501+
## vertices will be removed in the
502502
## simplification process
503503
#path.snap : True ## When True, rectilinear axis-aligned paths will be snapped to
504504
## the nearest pixel when certain criteria are met. When False,
@@ -531,8 +531,8 @@ backend : $TEMPLATE_BACKEND
531531
## leave empty to always use current working directory
532532
#savefig.transparent : False ## setting that controls whether figures are saved with a
533533
## transparent background by default
534-
#savefig.frameon : True ## enable frame of figure when saving
535-
#savefig.orientation : portrait ## Orientation of saved figure
534+
#savefig.frameon : True ## enable frame of figure when saving
535+
#savefig.orientation : portrait ## Orientation of saved figure
536536

537537
### tk backend params
538538
#tk.window_focus : False ## Maintain shell focus for TkAgg
@@ -595,7 +595,7 @@ backend : $TEMPLATE_BACKEND
595595
###ANIMATION settings
596596
#animation.html : none ## How to display the animation as HTML in
597597
## the IPython notebook. 'html5' uses
598-
## HTML5 video tag; 'jshtml' creates a
598+
## HTML5 video tag; 'jshtml' creates a
599599
## Javascript animation
600600
#animation.writer : ffmpeg ## MovieWriter 'backend' to use
601601
#animation.codec : h264 ## Codec to use for writing movie

src/_path_wrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,15 +443,15 @@ static PyObject *Py_affine_transform(PyObject *self, PyObject *args, PyObject *k
443443
numpy::array_view<double, 2> result(dims);
444444
CALL_CPP("affine_transform", (affine_transform_2d(vertices, trans, result)));
445445
return result.pyobj();
446-
} catch (py::exception) {
446+
} catch (py::exception &) {
447447
PyErr_Clear();
448448
try {
449449
numpy::array_view<double, 1> vertices(vertices_obj);
450450
npy_intp dims[] = { (npy_intp)vertices.size() };
451451
numpy::array_view<double, 1> result(dims);
452452
CALL_CPP("affine_transform", (affine_transform_1d(vertices, trans, result)));
453453
return result.pyobj();
454-
} catch (py::exception) {
454+
} catch (py::exception &) {
455455
return NULL;
456456
}
457457
}

src/py_converters.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ int convert_rect(PyObject *rectobj, void *rectp)
172172
rect->x2 = rect_arr(1, 0);
173173
rect->y2 = rect_arr(1, 1);
174174
}
175-
catch (py::exception)
175+
catch (py::exception &)
176176
{
177177
PyErr_Clear();
178178

@@ -190,7 +190,7 @@ int convert_rect(PyObject *rectobj, void *rectp)
190190
rect->x2 = rect_arr(2);
191191
rect->y2 = rect_arr(3);
192192
}
193-
catch (py::exception)
193+
catch (py::exception &)
194194
{
195195
return 0;
196196
}
@@ -352,7 +352,7 @@ int convert_trans_affine(PyObject *obj, void *transp)
352352
return 1;
353353
}
354354
}
355-
catch (py::exception)
355+
catch (py::exception &)
356356
{
357357
return 0;
358358
}

src/py_exceptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class exception : public std::exception
3030
} \
3131
return (errorcode); \
3232
} \
33-
catch (const std::bad_alloc) \
33+
catch (const std::bad_alloc &) \
3434
{ \
3535
PyErr_Format(PyExc_MemoryError, "In %s: Out of memory", (name)); \
3636
{ \

0 commit comments

Comments
 (0)