@@ -377,10 +377,11 @@ def __init__(self, transform, size, label, loc,
377
377
378
378
class AnchoredDirectionArrows (AnchoredOffsetbox ):
379
379
@docstring .dedent
380
- def __init__ (self , transform , label_x , label_y , length = 0.15 , fontsize = 0.08 , loc = 2 ,
381
- angle = 0 , aspect_ratio = 1 , pad = 0.1 , borderpad = 0.1 ,
382
- frameon = False , color = 'black' , alpha = 1 , sep_x = 0.01 ,sep_y = 0 , fontproperties = None ,
383
- back_length = 0.15 , head_width = 10 , head_length = 15 , tail_width = 2 ,
380
+ def __init__ (self , transform , label_x , label_y , length = 0.15 ,
381
+ fontsize = 0.08 , loc = 2 , angle = 0 , aspect_ratio = 1 , pad = 0.1 ,
382
+ borderpad = 0.1 , frameon = False , color = 'black' , alpha = 1 ,
383
+ sep_x = 0.01 ,sep_y = 0 , fontproperties = None , back_length = 0.15 ,
384
+ head_width = 10 , head_length = 15 , tail_width = 2 ,
384
385
lw = 0.5 , text_props = {}, arrow_props = {},
385
386
** kwargs ):
386
387
"""
@@ -392,6 +393,9 @@ def __init__(self, transform, label_x, label_y, length=0.15, fontsize=0.08, loc=
392
393
The transformation object for the coordinate system in use, i.e.,
393
394
:attr:`matplotlib.axes.Axes.transData`.
394
395
396
+ label_x, label_y : string
397
+ Label text for the x and y arrows
398
+
395
399
length : int or float
396
400
Length of the arrow, given in coordinates of
397
401
*transform*.
@@ -529,12 +533,16 @@ def __init__(self, transform, label_x, label_y, length=0.15, fontsize=0.08, loc=
529
533
self ._box .add_artist (self .arrow_y )
530
534
531
535
#Label X
532
- text_path_x = TextPath ((length_x + sep_x , back_length * length_y + sep_y ), label_x , size = fontsize , prop = fontproperties , roatation = angle )
536
+ text_path_x = TextPath ((
537
+ length_x + sep_x , back_length * length_y + sep_y ), label_x ,
538
+ size = fontsize , prop = fontproperties , roatation = angle )
533
539
self .p_x = PathPatch (text_path_x , transform = t_start , ** text_props )
534
540
self ._box .add_artist (self .p_x )
535
541
536
542
#Label Y
537
- text_path_y = TextPath ((length_x * back_length + sep_x , length_y * (1 - back_length )+ sep_y ), label_y , size = fontsize , prop = fontproperties )
543
+ text_path_y = TextPath ((
544
+ length_x * back_length + sep_x , length_y * (1 - back_length )+ sep_y ),
545
+ label_y , size = fontsize , prop = fontproperties )
538
546
self .p_y = PathPatch (text_path_y , ** text_props )
539
547
self ._box .add_artist (self .p_y )
540
548
0 commit comments