@@ -117,3 +117,39 @@ def test_axisline_style_size_color():
117
117
118
118
for direction in ("left" , "right" , "bottom" , "top" ):
119
119
ax .axis [direction ].set_visible (False )
120
+
121
+
122
+ @image_comparison (['axisline_style_tight.png' ], remove_text = True ,
123
+ style = 'mpl20' )
124
+ def test_axisline_style_tight ():
125
+ fig = plt .figure (figsize = (2 , 2 ))
126
+ ax = fig .add_subplot (axes_class = AxesZero )
127
+ ax .axis ["xzero" ].set_axisline_style ("-|>" , size = 5 , facecolor = 'g' )
128
+ ax .axis ["xzero" ].set_visible (True )
129
+ ax .axis ["yzero" ].set_axisline_style ("->, size=8" )
130
+ ax .axis ["yzero" ].set_visible (True )
131
+
132
+ for direction in ("left" , "right" , "bottom" , "top" ):
133
+ ax .axis [direction ].set_visible (False )
134
+
135
+ fig .tight_layout ()
136
+
137
+
138
+ @image_comparison (['subplotzero_ylabel.png' ], style = 'mpl20' )
139
+ def test_subplotzero_ylabel ():
140
+ fig = plt .figure ()
141
+ ax = SubplotZero (fig , 111 )
142
+ _ = fig .add_subplot (ax )
143
+
144
+ for direction in ["xzero" , "yzero" ]:
145
+ ax .axis [direction ].set_visible (True )
146
+ ax .axis [direction ].set_axisline_style ("->" )
147
+ # Set outward ticks
148
+ ax .axis [direction ].major_ticks .set_tick_out (True )
149
+ ax .axis [direction ].minor_ticks .set_tick_out (True )
150
+
151
+ ax .axis ["yzero" ].set_axis_direction ("left" )
152
+
153
+ plt .plot ([0 , 1 ], [0 , 1 ], c = "blue" , lw = 2 )
154
+ plt .xlabel ('x' )
155
+ plt .ylabel ('y' )
0 commit comments