diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 1e549feda3d0..3317f6af0fc3 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -1524,6 +1524,21 @@ def test_bar_timedelta(): (10, 20)) +def test_bar_pandas(pd): + # Smoke test for pandas + fig = plt.figure() + ax = fig.gca() + + df = pd.DataFrame( + {'year': [2018, 2018, 2018], + 'month': [1, 1, 1], + 'day': [1, 2, 3], + 'value': [1, 2, 3]}) + df['date'] = pd.to_datetime(df[['year', 'month', 'day']]) + + ax.bar(df['date'], df['value']) + + @image_comparison(baseline_images=['hist_log'], remove_text=True) def test_hist_log():