Skip to content

Commit

Permalink
Switch to draw_idle to try to fix bug on xticks update.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoppert committed Jan 14, 2017
1 parent 3abc310 commit 7d28842
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/tests/plotting/test_datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,8 @@ def test_format_timedelta_ticks_narrow(self):
rng = timedelta_range('0', periods=10, freq='ns')
df = DataFrame(np.random.randn(len(rng), 3), rng)
ax = df.plot(fontsize=2)
plt.draw()
plt.gcf().autofmt_xdate()
ax.get_figure().canvas.draw_idle()
labels = ax.get_xticklabels()
self.assertEqual(len(labels), len(expected_labels))
for l, l_expected in zip(labels, expected_labels):
Expand All @@ -1308,8 +1308,8 @@ def test_format_timedelta_ticks_wide(self):
rng = timedelta_range('0', periods=10, freq='1 d')
df = DataFrame(np.random.randn(len(rng), 3), rng)
ax = df.plot(fontsize=2)
plt.draw()
plt.gcf().autofmt_xdate()
ax.get_figure().canvas.draw_idle()
labels = ax.get_xticklabels()
self.assertEqual(len(labels), len(expected_labels))
for l, l_expected in zip(labels, expected_labels):
Expand Down

0 comments on commit 7d28842

Please sign in to comment.