Skip to content

Commit fb77182

Browse files
committed
Bump matplotlib minimum to 2.1.0
1 parent f2ccd80 commit fb77182

File tree

9 files changed

+23
-28
lines changed

9 files changed

+23
-28
lines changed

ci/deps/azure-27-locale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- bottleneck=1.2.*
77
- cython=0.28.2
88
- lxml
9-
- matplotlib=2.0.2
9+
- matplotlib=2.1.0
1010
- numpy=1.14.*
1111
- openpyxl=2.4.0
1212
- python-dateutil

doc/source/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Optional Dependencies
265265
* `pymysql <https://github.com/PyMySQL/PyMySQL>`__: for MySQL.
266266
* `SQLite <https://docs.python.org/3/library/sqlite3.html>`__: for SQLite, this is included in Python's standard library by default.
267267

268-
* `matplotlib <http://matplotlib.org/>`__: for plotting, Version 2.0.2 or higher.
268+
* `matplotlib <http://matplotlib.org/>`__: for plotting, Version 2.1.0 or higher.
269269
* For Excel I/O:
270270

271271
* `xlrd/xlwt <http://www.python-excel.org/>`__: Excel reading (xlrd), version 1.0.0 or higher required, and writing (xlwt)

doc/source/whatsnew/v0.25.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ If installed, we now require:
7979
+-----------------+-----------------+----------+
8080
| bottleneck | 1.2.1 | |
8181
+-----------------+-----------------+----------+
82-
| matplotlib | 2.0.2 | |
82+
| matplotlib | 2.1.0 | |
8383
+-----------------+-----------------+----------+
8484
| numexpr | 2.6.2 | |
8585
+-----------------+-----------------+----------+

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies:
3636
- ipykernel
3737
- jinja2
3838
- lxml
39-
- matplotlib>=2.0.2
39+
- matplotlib>=2.1.0
4040
- nbsphinx
4141
- numexpr>=2.6.8
4242
- openpyxl

pandas/plotting/_compat.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ def inner():
1818
return inner
1919

2020

21-
_mpl_eq_2_0_2 = _mpl_version('2.0.2', operator.eq)
22-
_mpl_ge_2_0_2 = _mpl_version('2.0.2', operator.ge)
2321
_mpl_ge_2_1_0 = _mpl_version('2.1.0', operator.ge)
2422
_mpl_eq_2_2_0 = _mpl_version('2.2.0', operator.eq)
2523
_mpl_ge_2_2_0 = _mpl_version('2.2.0', operator.ge)

pandas/tests/plotting/common.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ def setup_method(self, method):
5353
import matplotlib as mpl
5454
mpl.rcdefaults()
5555

56-
self.mpl_eq_2_0_2 = plotting._compat._mpl_eq_2_0_2()
57-
self.mpl_ge_2_0_2 = plotting._compat._mpl_ge_2_0_2()
5856
self.mpl_ge_2_1_0 = plotting._compat._mpl_ge_2_1_0()
5957
self.mpl_eq_2_2_0 = plotting._compat._mpl_eq_2_2_0()
6058
self.mpl_ge_2_2_0 = plotting._compat._mpl_ge_2_2_0()

pandas/tests/plotting/test_datetimelike.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ def test_get_finder(self):
406406
def test_finder_daily(self):
407407
day_lst = [10, 40, 252, 400, 950, 2750, 10000]
408408

409-
if self.mpl_ge_3_0_0 or self.mpl_eq_2_0_2 or self.mpl_eq_2_2_0:
410-
# 2.0.2, 2.2.0 (exactly) or >= 3.0.0
409+
if self.mpl_ge_3_0_0 or self.mpl_eq_2_2_0:
410+
# 2.2.0 (exactly) or >= 3.0.0
411411
xpl1 = xpl2 = [Period('1999-1-1', freq='B').ordinal] * len(day_lst)
412412
else: # 2.1.0, 2.2.2, 2.2.3, 2.2.4
413413
xpl1 = [7565, 7564, 7553, 7546, 7518, 7428, 7066]
@@ -435,8 +435,8 @@ def test_finder_daily(self):
435435
def test_finder_quarterly(self):
436436
yrs = [3.5, 11]
437437

438-
if self.mpl_ge_3_0_0 or self.mpl_eq_2_0_2 or self.mpl_eq_2_2_0:
439-
# 2.0.2, 2.2.0 (exactly) or >= 3.0.0
438+
if self.mpl_ge_3_0_0 or self.mpl_eq_2_2_0:
439+
# 2.2.0 (exactly) or >= 3.0.0
440440
xpl1 = xpl2 = [Period('1988Q1').ordinal] * len(yrs)
441441
else: # 2.1.0, 2.2.2, 2.2.3, 2.2.4
442442
xpl1 = [68, 68]
@@ -464,8 +464,8 @@ def test_finder_quarterly(self):
464464
def test_finder_monthly(self):
465465
yrs = [1.15, 2.5, 4, 11]
466466

467-
if self.mpl_ge_3_0_0 or self.mpl_eq_2_0_2 or self.mpl_eq_2_2_0:
468-
# 2.0.2, 2.2.0 (exactly) or >= 3.0.0
467+
if self.mpl_ge_3_0_0 or self.mpl_eq_2_2_0:
468+
# 2.2.0 (exactly) or >= 3.0.0
469469
xpl1 = xpl2 = [Period('Jan 1988').ordinal] * len(yrs)
470470
else: # 2.1.0, 2.2.2, 2.2.3, 2.2.4
471471
xpl1 = [216, 216, 204, 204]
@@ -501,8 +501,8 @@ def test_finder_monthly_long(self):
501501

502502
@pytest.mark.slow
503503
def test_finder_annual(self):
504-
if self.mpl_ge_3_0_0 or self.mpl_eq_2_0_2 or self.mpl_eq_2_2_0:
505-
# 2.0.2, 2.2.0 (exactly) or >= 3.0.0
504+
if self.mpl_ge_3_0_0 or self.mpl_eq_2_2_0:
505+
# 2.2.0 (exactly) or >= 3.0.0
506506
xp = [1987, 1988, 1990, 1990, 1995, 2020, 2070, 2170]
507507
else: # 2.1.0, 2.2.2, 2.2.3, 2.2.4
508508
xp = [1986, 1986, 1990, 1990, 1995, 2020, 1970, 1970]
@@ -556,8 +556,8 @@ def test_gaps(self):
556556
line = lines[0]
557557
data = line.get_xydata()
558558

559-
if self.mpl_ge_3_0_0 or self.mpl_eq_2_0_2 or self.mpl_eq_2_2_0:
560-
# 2.0.2, 2.2.0 (exactly) or >= 3.0.0
559+
if self.mpl_ge_3_0_0 or self.mpl_eq_2_2_0:
560+
# 2.2.0 (exactly) or >= 3.0.0
561561
data = np.ma.MaskedArray(data, mask=isna(data), fill_value=np.nan)
562562

563563
assert isinstance(data, np.ma.core.MaskedArray)
@@ -576,8 +576,8 @@ def test_gaps(self):
576576
line = lines[0]
577577
data = line.get_xydata()
578578

579-
if self.mpl_ge_3_0_0 or self.mpl_eq_2_0_2 or self.mpl_eq_2_2_0:
580-
# 2.0.2, 2.2.0 (exactly) or >= 3.0.0
579+
if self.mpl_ge_3_0_0 or self.mpl_eq_2_2_0:
580+
# 2.2.0 (exactly) or >= 3.0.0
581581
data = np.ma.MaskedArray(data, mask=isna(data), fill_value=np.nan)
582582

583583
assert isinstance(data, np.ma.core.MaskedArray)
@@ -595,8 +595,8 @@ def test_gaps(self):
595595
assert len(lines) == 1
596596
line = lines[0]
597597
data = line.get_xydata()
598-
if self.mpl_ge_3_0_0 or self.mpl_eq_2_0_2 or self.mpl_eq_2_2_0:
599-
# 2.0.2, 2.2.0 (exactly) or >= 3.0.0
598+
if self.mpl_ge_3_0_0 or self.mpl_eq_2_2_0:
599+
# 2.2.0 (exactly) or >= 3.0.0
600600
data = np.ma.MaskedArray(data, mask=isna(data), fill_value=np.nan)
601601

602602
assert isinstance(data, np.ma.core.MaskedArray)
@@ -619,8 +619,8 @@ def test_gap_upsample(self):
619619

620620
line = lines[0]
621621
data = line.get_xydata()
622-
if self.mpl_ge_3_0_0 or self.mpl_eq_2_0_2 or self.mpl_eq_2_2_0:
623-
# 2.0.2, 2.2.0 (exactly) or >= 3.0.0
622+
if self.mpl_ge_3_0_0 or self.mpl_eq_2_2_0:
623+
# 2.2.0 (exactly) or >= 3.0.0
624624
data = np.ma.MaskedArray(data, mask=isna(data), fill_value=np.nan)
625625

626626
assert isinstance(data, np.ma.core.MaskedArray)
@@ -1415,7 +1415,7 @@ def test_format_timedelta_ticks_wide(self):
14151415
]
14161416
if self.mpl_ge_2_2_0:
14171417
expected_labels = expected_labels[1:-1]
1418-
elif self.mpl_ge_2_0_2:
1418+
elif self.mpl_ge_2_1_0:
14191419
expected_labels = expected_labels[1:-1]
14201420
expected_labels[-1] = ''
14211421

pandas/tests/plotting/test_series.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,7 @@ def test_errorbar_plot(self):
779779
s.plot(yerr=np.arange(11))
780780

781781
s_err = ['zzz'] * 10
782-
exc = TypeError if self.mpl_ge_2_1_0 else ValueError
783-
with pytest.raises(exc):
782+
with pytest.raises(TypeError):
784783
s.plot(yerr=s_err)
785784

786785
# This XPASSES when tested with mpl == 3.0.1

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ipython>=5.6.0
2525
ipykernel
2626
jinja2
2727
lxml
28-
matplotlib>=2.0.2
28+
matplotlib>=2.1.0
2929
nbsphinx
3030
numexpr>=2.6.8
3131
openpyxl

0 commit comments

Comments
 (0)