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 66b5d8d

Browse filesBrowse files
committed
Stopgap fix for pandas converters in tests.
1 parent ea4274e commit 66b5d8d
Copy full SHA for 66b5d8d

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,9 +1598,6 @@ def test_boxplot_dates_pandas(pd):
15981598

15991599
def test_bar_pandas(pd):
16001600
# Smoke test for pandas
1601-
1602-
fig, ax = plt.subplots()
1603-
16041601
df = pd.DataFrame(
16051602
{'year': [2018, 2018, 2018],
16061603
'month': [1, 1, 1],
@@ -1612,8 +1609,12 @@ def test_bar_pandas(pd):
16121609
dates = monthly.index
16131610
forecast = monthly['value']
16141611
baseline = monthly['value']
1612+
1613+
pd.plotting.register_matplotlib_converters()
1614+
fig, ax = plt.subplots()
16151615
ax.bar(dates, forecast, width=10, align='center')
16161616
ax.plot(dates, baseline, color='orange', lw=4)
1617+
pd.plotting.deregister_matplotlib_converters()
16171618

16181619

16191620
@image_comparison(['hist_log'], remove_text=True)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.