File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,20 @@ def test_hist_layout(self):
238
238
with tm .assertRaises (ValueError ):
239
239
df .hist (layout = (- 1 , - 1 ))
240
240
241
+ @slow
242
+ def test_tight_layout (self ):
243
+ tm ._skip_if_mpl_1 ()
244
+
245
+ df = DataFrame (randn (100 , 2 ))
246
+ df .plot .hist ()
247
+
248
+ try :
249
+ self .plt .tight_layout ()
250
+ except AttributeError :
251
+ raise
252
+
253
+ tm .close ()
254
+
241
255
242
256
@tm .mplskip
243
257
class TestDataFrameGroupByPlots (TestPlotBase ):
Original file line number Diff line number Diff line change @@ -286,6 +286,14 @@ def _skip_if_mpl_1_5():
286
286
pytest .skip ("matplotlib 1.5" )
287
287
288
288
289
+ def _skip_if_mpl_1 ():
290
+ import matplotlib
291
+ v = matplotlib .__version__
292
+ if v < LooseVersion ('2.0.0' ) or v [0 ] == '0' or v [0 ] == '1' :
293
+ import pytest
294
+ pytest .skip ("matplotlib 1.5" )
295
+
296
+
289
297
def _skip_if_no_scipy ():
290
298
try :
291
299
import scipy .stats # noqa
You can’t perform that action at this time.
0 commit comments