@@ -603,16 +603,16 @@ def test_hist_layout_with_by(self):
603
603
df = self .hist_df
604
604
605
605
axes = _check_plot_works (df .height .hist , by = df .gender , layout = (2 , 1 ))
606
- self ._check_axes_shape (axes , axes_num = 2 , layout = (2 , 1 ), figsize = ( 10 , 5 ) )
606
+ self ._check_axes_shape (axes , axes_num = 2 , layout = (2 , 1 ))
607
607
608
608
axes = _check_plot_works (df .height .hist , by = df .category , layout = (4 , 1 ))
609
- self ._check_axes_shape (axes , axes_num = 4 , layout = (4 , 1 ), figsize = ( 10 , 5 ) )
609
+ self ._check_axes_shape (axes , axes_num = 4 , layout = (4 , 1 ))
610
610
611
611
axes = _check_plot_works (df .height .hist , by = df .classroom , layout = (2 , 2 ))
612
- self ._check_axes_shape (axes , axes_num = 3 , layout = (2 , 2 ), figsize = ( 10 , 5 ) )
612
+ self ._check_axes_shape (axes , axes_num = 3 , layout = (2 , 2 ))
613
613
614
- axes = _check_plot_works (df .height .hist , by = df .category , layout = (4 , 2 ))
615
- self ._check_axes_shape (axes , axes_num = 4 , layout = (4 , 2 ), figsize = (10 , 5 ))
614
+ axes = _check_plot_works (df .height .hist , by = df .category , layout = (4 , 2 ), figsize = ( 12 , 7 ) )
615
+ self ._check_axes_shape (axes , axes_num = 4 , layout = (4 , 2 ), figsize = (12 , 7 ))
616
616
617
617
@slow
618
618
def test_hist_no_overlap (self ):
@@ -2255,11 +2255,11 @@ def test_grouped_hist(self):
2255
2255
df = DataFrame (randn (500 , 2 ), columns = ['A' , 'B' ])
2256
2256
df ['C' ] = np .random .randint (0 , 4 , 500 )
2257
2257
axes = plotting .grouped_hist (df .A , by = df .C )
2258
- self ._check_axes_shape (axes , axes_num = 4 , layout = (2 , 2 ), figsize = ( 10 , 5 ) )
2258
+ self ._check_axes_shape (axes , axes_num = 4 , layout = (2 , 2 ))
2259
2259
2260
2260
tm .close ()
2261
2261
axes = df .hist (by = df .C )
2262
- self ._check_axes_shape (axes , axes_num = 4 , layout = (2 , 2 ), figsize = ( 10 , 5 ) )
2262
+ self ._check_axes_shape (axes , axes_num = 4 , layout = (2 , 2 ))
2263
2263
2264
2264
tm .close ()
2265
2265
# make sure kwargs to hist are handled
@@ -2281,6 +2281,9 @@ def test_grouped_hist(self):
2281
2281
with tm .assertRaises (AttributeError ):
2282
2282
plotting .grouped_hist (df .A , by = df .C , foo = 'bar' )
2283
2283
2284
+ with tm .assert_produces_warning (FutureWarning ):
2285
+ df .hist (by = 'C' , figsize = 'default' )
2286
+
2284
2287
@slow
2285
2288
def test_grouped_box_return_type (self ):
2286
2289
df = self .hist_df
@@ -2374,29 +2377,28 @@ def test_grouped_hist_layout(self):
2374
2377
layout = (1 , 3 ))
2375
2378
2376
2379
axes = _check_plot_works (df .hist , column = 'height' , by = df .gender , layout = (2 , 1 ))
2377
- self ._check_axes_shape (axes , axes_num = 2 , layout = (2 , 1 ), figsize = ( 10 , 5 ) )
2380
+ self ._check_axes_shape (axes , axes_num = 2 , layout = (2 , 1 ))
2378
2381
2379
2382
axes = _check_plot_works (df .hist , column = 'height' , by = df .category , layout = (4 , 1 ))
2380
- self ._check_axes_shape (axes , axes_num = 4 , layout = (4 , 1 ), figsize = ( 10 , 5 ) )
2383
+ self ._check_axes_shape (axes , axes_num = 4 , layout = (4 , 1 ))
2381
2384
2382
2385
axes = _check_plot_works (df .hist , column = 'height' , by = df .category ,
2383
2386
layout = (4 , 2 ), figsize = (12 , 8 ))
2384
-
2385
2387
self ._check_axes_shape (axes , axes_num = 4 , layout = (4 , 2 ), figsize = (12 , 8 ))
2386
2388
2387
2389
# GH 6769
2388
2390
axes = _check_plot_works (df .hist , column = 'height' , by = 'classroom' , layout = (2 , 2 ))
2389
- self ._check_axes_shape (axes , axes_num = 3 , layout = (2 , 2 ), figsize = ( 10 , 5 ) )
2391
+ self ._check_axes_shape (axes , axes_num = 3 , layout = (2 , 2 ))
2390
2392
2391
2393
# without column
2392
2394
axes = _check_plot_works (df .hist , by = 'classroom' )
2393
- self ._check_axes_shape (axes , axes_num = 3 , layout = (2 , 2 ), figsize = ( 10 , 5 ) )
2395
+ self ._check_axes_shape (axes , axes_num = 3 , layout = (2 , 2 ))
2394
2396
2395
2397
axes = _check_plot_works (df .hist , by = 'gender' , layout = (3 , 5 ))
2396
- self ._check_axes_shape (axes , axes_num = 2 , layout = (3 , 5 ), figsize = ( 10 , 5 ) )
2398
+ self ._check_axes_shape (axes , axes_num = 2 , layout = (3 , 5 ))
2397
2399
2398
2400
axes = _check_plot_works (df .hist , column = ['height' , 'weight' , 'category' ])
2399
- self ._check_axes_shape (axes , axes_num = 3 , layout = (2 , 2 ), figsize = ( 10 , 5 ) )
2401
+ self ._check_axes_shape (axes , axes_num = 3 , layout = (2 , 2 ))
2400
2402
2401
2403
@slow
2402
2404
def test_axis_share_x (self ):
0 commit comments