@@ -159,6 +159,25 @@ def test_tight_layout8():
159
159
example_plot (ax , fontsize = 24 )
160
160
161
161
162
+ @image_comparison (baseline_images = ['outward_ticks' ], remove_text = True )
163
+ def test_outward_ticks ():
164
+ 'Test automatic use of tight_layout'
165
+ fig = plt .figure ()
166
+ ax = fig .add_subplot (221 )
167
+ ax .xaxis .set_tick_params (tickdir = 'out' , length = 32 , width = 3 )
168
+ ax .yaxis .set_tick_params (tickdir = 'out' , length = 32 , width = 3 )
169
+ ax = fig .add_subplot (222 )
170
+ ax .xaxis .set_tick_params (tickdir = 'in' , length = 32 , width = 3 )
171
+ ax .yaxis .set_tick_params (tickdir = 'in' , length = 32 , width = 3 )
172
+ ax = fig .add_subplot (223 )
173
+ ax .xaxis .set_tick_params (tickdir = 'inout' , length = 32 , width = 3 )
174
+ ax .yaxis .set_tick_params (tickdir = 'inout' , length = 32 , width = 3 )
175
+ ax = fig .add_subplot (224 )
176
+ ax .xaxis .set_tick_params (tickdir = 'out' , length = 32 , width = 3 )
177
+ ax .yaxis .set_tick_params (tickdir = 'out' , length = 32 , width = 3 )
178
+ plt .tight_layout ()
179
+
180
+
162
181
def add_offsetboxes (ax , size = 10 , margin = .1 , color = 'black' ):
163
182
"""
164
183
Surround ax with OffsetBoxes
0 commit comments