@@ -803,7 +803,7 @@ def get_title(self):
803
803
return self ._legend_title_box ._text
804
804
805
805
def get_window_extent (self ,* args ,** kwargs ):
806
- 'return a extent of thethe legend'
806
+ 'return a extent of the legend'
807
807
return self .legendPatch .get_window_extent (* args ,** kwargs )
808
808
809
809
def get_frame_on (self ):
@@ -999,7 +999,7 @@ class UniformLegend(Legend):
999
999
def __str__ (self ):
1000
1000
return "uniformLegend"
1001
1001
1002
- def __init__ (self ,parent ,handles ,labels ,uniform_size ,
1002
+ def __init__ (self ,parent ,handles ,labels ,uniform_size ,
1003
1003
loc = None ,
1004
1004
numpoints = None ,# the number of points in the legend line
1005
1005
markerfirst = True ,# controls ordering (left-to-right) of
@@ -1037,56 +1037,46 @@ def __init__(self, parent, handles, labels,uniform_size,
1037
1037
frameon = None
1038
1038
):
1039
1039
uniformHandlerMap = {
1040
- StemContainer :
1040
+ StemContainer :
1041
1041
legend_handler .HandlerUniformStem (uniform_size = uniform_size ),
1042
- ErrorbarContainer :
1042
+ ErrorbarContainer :
1043
1043
legend_handler .HandlerUniformErrorBar (uniform_size = uniform_size ),
1044
- Line2D :legend_handler .HandlerUniformLine2D (uniform_size = uniform_size ),
1045
- PathCollection :
1044
+ Line2D :
1045
+ legend_handler .HandlerUniformLine2D (uniform_size = uniform_size ),
1046
+ PathCollection :
1046
1047
legend_handler .HandlerPathCollection (sizes = [uniform_size ]* 3 ),
1047
- RegularPolyCollection :
1048
- legend_handler .HandlerRegularPolyCollection (sizes = [uniform_size ]* 3 ),
1049
- CircleCollection :
1048
+ RegularPolyCollection :
1049
+ legend_handler .HandlerRegularPolyCollection (
1050
+ sizes = [uniform_size ]* 3 ),
1051
+ CircleCollection :
1050
1052
legend_handler .HandlerCircleCollection (sizes = [uniform_size ]* 3 ),
1051
1053
}
1052
1054
1053
- Legend .__init__ (self ,parent ,handles ,labels ,
1054
- loc = loc ,
1055
- numpoints = numpoints ,# the number of points in the legend line
1056
- markerscale = None ,# the relative size of legend markers
1057
- # vs. original
1058
- markerfirst = markerfirst ,# controls ordering (left-to-right) of
1059
- # legend marker and label
1060
- scatterpoints = scatterpoints ,# number of scatter points
1061
- scatteryoffsets = scatteryoffsets ,
1062
- prop = prop ,# properties for the legend texts
1063
- fontsize = fontsize ,# keyword to set font size directly
1064
-
1065
- # spacing & pad defined as a fraction of the font-size
1066
- borderpad = borderpad ,# the whitespace inside the legend border
1067
- labelspacing = labelspacing ,# the vertical space between the legend
1068
- # entries
1069
- handlelength = handlelength ,# the length of the legend handles
1070
- handleheight = handleheight ,# the height of the legend handles
1071
- handletextpad = handletextpad ,# the pad between the legend handle
1072
- # and text
1073
- borderaxespad = borderaxespad ,# the pad between the axes and legend
1074
- # border
1075
- columnspacing = columnspacing ,# spacing between columns
1076
-
1077
- ncol = 1 ,# number of columns
1078
- mode = mode ,# mode for horizontal distribution of columns.
1079
- # None, "expand"
1080
-
1081
- fancybox = fancybox ,# True use a fancy box, false use a rounded
1082
- # box, none use rc
1083
- shadow = shadow ,
1084
- title = title ,# set a title for the legend
1085
-
1086
- framealpha = framealpha ,# set frame alpha
1087
-
1088
- bbox_to_anchor = bbox_to_anchor ,# bbox that the legend will be anchored.
1089
- bbox_transform = bbox_transform ,# transform for the bbox
1090
- frameon = frameon ,# draw frame
1091
- handler_map = uniformHandlerMap ,
1092
- )
1055
+ # Consult Legend.__init__ for purpose of each parameter.
1056
+ Legend .__init__ (self ,parent ,handles ,labels ,
1057
+ loc = loc ,
1058
+ numpoints = numpoints ,
1059
+ markerscale = None ,
1060
+ markerfirst = markerfirst ,
1061
+ scatterpoints = scatterpoints ,
1062
+ scatteryoffsets = scatteryoffsets ,
1063
+ prop = prop ,
1064
+ fontsize = fontsize ,
1065
+ borderpad = borderpad ,
1066
+ labelspacing = labelspacing ,
1067
+ handlelength = handlelength ,
1068
+ handleheight = handleheight ,
1069
+ handletextpad = handletextpad ,
1070
+ borderaxespad = borderaxespad ,
1071
+ columnspacing = columnspacing ,
1072
+ ncol = 1 ,
1073
+ mode = mode ,
1074
+ fancybox = fancybox ,
1075
+ shadow = shadow ,
1076
+ title = title ,
1077
+ framealpha = framealpha ,
1078
+ bbox_to_anchor = bbox_to_anchor ,
1079
+ bbox_transform = bbox_transform ,
1080
+ frameon = frameon ,
1081
+ handler_map = uniformHandlerMap ,
1082
+ )