Skip to content

Commit 3abc310

Browse files
committed
Try plt.draw() instead of canvas.draw() to fix issue on osx 3.5.
1 parent 91954bd commit 3abc310

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tests/plotting/test_datetimelike.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ def test_format_timedelta_ticks_narrow(self):
12821282
rng = timedelta_range('0', periods=10, freq='ns')
12831283
df = DataFrame(np.random.randn(len(rng), 3), rng)
12841284
ax = df.plot(fontsize=2)
1285-
ax.get_figure().canvas.draw()
1285+
plt.draw()
12861286
plt.gcf().autofmt_xdate()
12871287
labels = ax.get_xticklabels()
12881288
self.assertEqual(len(labels), len(expected_labels))
@@ -1308,7 +1308,7 @@ def test_format_timedelta_ticks_wide(self):
13081308
rng = timedelta_range('0', periods=10, freq='1 d')
13091309
df = DataFrame(np.random.randn(len(rng), 3), rng)
13101310
ax = df.plot(fontsize=2)
1311-
ax.get_figure().canvas.draw()
1311+
plt.draw()
13121312
plt.gcf().autofmt_xdate()
13131313
labels = ax.get_xticklabels()
13141314
self.assertEqual(len(labels), len(expected_labels))

0 commit comments

Comments
 (0)