File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,7 @@ Bug Fixes
629629
630630- Bug in ``.read_csv()`` with ``parse_dates`` when multiline headers are specified (:issue:`15376`)
631631
632-
632+ - Bug in ``DataFrame.hist`` where ``plt.tight_layout`` caused an ``AttributeError`` (use ``matplotlib >= 0.2.0``) (:issue:`9351`)
633633- Bug in ``DataFrame.boxplot`` where ``fontsize`` was not applied to the tick labels on both axes (:issue:`15108`)
634634- Bug in ``Series.replace`` and ``DataFrame.replace`` which failed on empty replacement dicts (:issue:`15289`)
635635- Bug in ``pd.melt()`` where passing a tuple value for ``value_vars`` caused a ``TypeError`` (:issue:`15348`)
Original file line number Diff line number Diff line change @@ -238,6 +238,16 @@ def test_hist_layout(self):
238238 with tm .assertRaises (ValueError ):
239239 df .hist (layout = (- 1 , - 1 ))
240240
241+ @slow
242+ # GH 9351
243+ def test_tight_layout (self ):
244+ if self .mpl_ge_2_0_0 :
245+ df = DataFrame (randn (100 , 2 ))
246+ _check_plot_works (df .hist )
247+ self .plt .tight_layout ()
248+
249+ tm .close ()
250+
241251
242252@tm .mplskip
243253class TestDataFrameGroupByPlots (TestPlotBase ):
You can’t perform that action at this time.
0 commit comments