@@ -32,14 +32,14 @@ def figure(ax=None, scale=None, permutation=None):
32
32
33
33
def mpl_redraw_callback (event , tax ):
34
34
"""
35
- Callback to properly rotate and redraw text labels when the plot is drawn
35
+ Callback to properly rotate and redraw text labels when the plot is drawn
36
36
or resized.
37
37
38
38
Parameters:
39
39
event: a matplotlib event
40
40
either 'resize_event' or 'draw_event'
41
41
tax: TernaryAxesSubplot
42
- the TernaryAxesSubplot
42
+ the TernaryAxesSubplot
43
43
"""
44
44
tax ._redraw_labels ()
45
45
@@ -235,7 +235,7 @@ def line(self, p1, p2, **kwargs):
235
235
def horizontal_line (self , i , ** kwargs ):
236
236
ax = self .get_axes ()
237
237
scale = self .get_scale ()
238
- lines .horizontal_line (ax , scale , i , ** kwargs )
238
+ lines .horizontal_line (ax , scale , i , ** kwargs )
239
239
240
240
def left_parallel_line (self , i , ** kwargs ):
241
241
ax = self .get_axes ()
@@ -249,17 +249,21 @@ def right_parallel_line(self, i, **kwargs):
249
249
250
250
# Matplotlib passthroughs
251
251
252
+ def close (self ):
253
+ fig = self .get_figure ()
254
+ pyplot .close (fig )
255
+
252
256
def legend (self , * args , ** kwargs ):
253
257
ax = self .get_axes ()
254
258
ax .legend (* args , ** kwargs )
255
259
256
260
def savefig (self , filename , dpi = 200 , format = None ):
257
261
self ._redraw_labels ()
258
- figure = self .get_figure ()
259
- figure .savefig (filename , format = format , dpi = dpi )
262
+ fig = self .get_figure ()
263
+ fig .savefig (filename , format = format , dpi = dpi )
260
264
261
- @staticmethod
262
265
def show (self ):
266
+ self ._redraw_labels ()
263
267
pyplot .show ()
264
268
265
269
# Axis ticks
@@ -302,7 +306,7 @@ def ticks(self, ticks=None, locations=None, multiple=1, axis='blr',
302
306
ax = self .get_axes ()
303
307
scale = self .get_scale ()
304
308
lines .ticks (ax , scale , ticks = ticks , locations = locations ,
305
- multiple = multiple , clockwise = clockwise , axis = axis ,
309
+ multiple = multiple , clockwise = clockwise , axis = axis ,
306
310
axes_colors = axes_colors , tick_formats = tick_formats ,
307
311
** kwargs )
308
312
@@ -337,7 +341,7 @@ def _redraw_labels(self):
337
341
** kwargs )
338
342
text .set_rotation_mode ("anchor" )
339
343
self ._to_remove .append (text )
340
-
344
+
341
345
def convert_coordinates (self , points , axisorder = 'blr' ):
342
346
"""
343
347
Convert data coordinates to simplex coordinates for plotting
0 commit comments