@@ -128,7 +128,7 @@ def test_constrained_layout7():
128128 for gs in gsl :
129129 fig .add_subplot (gs )
130130 # need to trigger a draw to get warning
131- fig .draw_no_output ()
131+ fig .draw_without_rendering ()
132132
133133
134134@image_comparison (['constrained_layout8.png' ])
@@ -309,7 +309,7 @@ def test_constrained_layout18():
309309 ax2 = ax .twinx ()
310310 example_plot (ax )
311311 example_plot (ax2 , fontsize = 24 )
312- fig .draw_no_output ()
312+ fig .draw_without_rendering ()
313313 assert all (ax .get_position ().extents == ax2 .get_position ().extents )
314314
315315
@@ -321,7 +321,7 @@ def test_constrained_layout19():
321321 example_plot (ax2 , fontsize = 24 )
322322 ax2 .set_title ('' )
323323 ax .set_title ('' )
324- fig .draw_no_output ()
324+ fig .draw_without_rendering ()
325325 assert all (ax .get_position ().extents == ax2 .get_position ().extents )
326326
327327
@@ -341,11 +341,11 @@ def test_constrained_layout21():
341341 fig , ax = plt .subplots (constrained_layout = True )
342342
343343 fig .suptitle ("Suptitle0" )
344- fig .draw_no_output ()
344+ fig .draw_without_rendering ()
345345 extents0 = np .copy (ax .get_position ().extents )
346346
347347 fig .suptitle ("Suptitle1" )
348- fig .draw_no_output ()
348+ fig .draw_without_rendering ()
349349 extents1 = np .copy (ax .get_position ().extents )
350350
351351 np .testing .assert_allclose (extents0 , extents1 )
@@ -355,11 +355,11 @@ def test_constrained_layout22():
355355 """#11035: suptitle should not be include in CL if manually positioned"""
356356 fig , ax = plt .subplots (constrained_layout = True )
357357
358- fig .draw_no_output ()
358+ fig .draw_without_rendering ()
359359 extents0 = np .copy (ax .get_position ().extents )
360360
361361 fig .suptitle ("Suptitle" , y = 0.5 )
362- fig .draw_no_output ()
362+ fig .draw_without_rendering ()
363363 extents1 = np .copy (ax .get_position ().extents )
364364
365365 np .testing .assert_allclose (extents0 , extents1 )
@@ -407,7 +407,7 @@ def test_hidden_axes():
407407 # (as does a gridspec slot that is empty)
408408 fig , axs = plt .subplots (2 , 2 , constrained_layout = True )
409409 axs [0 , 1 ].set_visible (False )
410- fig .draw_no_output ()
410+ fig .draw_without_rendering ()
411411 extents1 = np .copy (axs [0 , 0 ].get_position ().extents )
412412
413413 np .testing .assert_allclose (
@@ -433,7 +433,7 @@ def test_colorbar_align():
433433 fig .set_constrained_layout_pads (w_pad = 4 / 72 , h_pad = 4 / 72 , hspace = 0.1 ,
434434 wspace = 0.1 )
435435
436- fig .draw_no_output ()
436+ fig .draw_without_rendering ()
437437 if location in ['left' , 'right' ]:
438438 np .testing .assert_allclose (cbs [0 ].ax .get_position ().x0 ,
439439 cbs [2 ].ax .get_position ().x0 )
@@ -475,15 +475,15 @@ def test_colorbars_no_overlapH():
475475def test_manually_set_position ():
476476 fig , axs = plt .subplots (1 , 2 , constrained_layout = True )
477477 axs [0 ].set_position ([0.2 , 0.2 , 0.3 , 0.3 ])
478- fig .draw_no_output ()
478+ fig .draw_without_rendering ()
479479 pp = axs [0 ].get_position ()
480480 np .testing .assert_allclose (pp , [[0.2 , 0.2 ], [0.5 , 0.5 ]])
481481
482482 fig , axs = plt .subplots (1 , 2 , constrained_layout = True )
483483 axs [0 ].set_position ([0.2 , 0.2 , 0.3 , 0.3 ])
484484 pc = axs [0 ].pcolormesh (np .random .rand (20 , 20 ))
485485 fig .colorbar (pc , ax = axs [0 ])
486- fig .draw_no_output ()
486+ fig .draw_without_rendering ()
487487 pp = axs [0 ].get_position ()
488488 np .testing .assert_allclose (pp , [[0.2 , 0.2 ], [0.44 , 0.5 ]])
489489
@@ -528,7 +528,7 @@ def test_align_labels():
528528
529529 fig .align_ylabels (axs = (ax3 , ax1 , ax2 ))
530530
531- fig .draw_no_output ()
531+ fig .draw_without_rendering ()
532532 after_align = [ax1 .yaxis .label .get_window_extent (),
533533 ax2 .yaxis .label .get_window_extent (),
534534 ax3 .yaxis .label .get_window_extent ()]
@@ -541,22 +541,22 @@ def test_align_labels():
541541
542542def test_suplabels ():
543543 fig , ax = plt .subplots (constrained_layout = True )
544- fig .draw_no_output ()
544+ fig .draw_without_rendering ()
545545 pos0 = ax .get_tightbbox (fig .canvas .get_renderer ())
546546 fig .supxlabel ('Boo' )
547547 fig .supylabel ('Booy' )
548- fig .draw_no_output ()
548+ fig .draw_without_rendering ()
549549 pos = ax .get_tightbbox (fig .canvas .get_renderer ())
550550 assert pos .y0 > pos0 .y0 + 10.0
551551 assert pos .x0 > pos0 .x0 + 10.0
552552
553553 fig , ax = plt .subplots (constrained_layout = True )
554- fig .draw_no_output ()
554+ fig .draw_without_rendering ()
555555 pos0 = ax .get_tightbbox (fig .canvas .get_renderer ())
556556 # check that specifying x (y) doesn't ruin the layout
557557 fig .supxlabel ('Boo' , x = 0.5 )
558558 fig .supylabel ('Boo' , y = 0.5 )
559- fig .draw_no_output ()
559+ fig .draw_without_rendering ()
560560 pos = ax .get_tightbbox (fig .canvas .get_renderer ())
561561 assert pos .y0 > pos0 .y0 + 10.0
562562 assert pos .x0 > pos0 .x0 + 10.0
0 commit comments