@@ -801,25 +801,25 @@ class LogFormatter(Formatter):
801
801
Format values for log axis.
802
802
"""
803
803
def __init__ (self , base = 10.0 , labelOnlyBase = False ,
804
- sublabel_filtering = False ):
804
+ label_pruning = False ):
805
805
"""
806
806
`base` is used to locate the decade tick, which will be the only
807
807
one to be labeled if `labelOnlyBase` is ``True``.
808
808
809
- Parameter
810
- ---------
809
+ Parameters
810
+ ----------
811
811
base : float, optional, default: 10.
812
812
base of the logarithm.
813
813
814
814
labelOnlyBase : bool, optional, default: False
815
- whether to only label decades ticks.
815
+ whether to only label decades ticks.
816
816
817
- sublabel_filtering : bool, optional, default: False
818
- When set to True, label on a subset of ticks.
817
+ label_pruning : bool, optional, default: False
818
+ when set to True, label on a subset of ticks.
819
819
"""
820
820
self ._base = base + 0.0
821
821
self .labelOnlyBase = labelOnlyBase
822
- self .sublabel_filtering = sublabel_filtering
822
+ self .label_pruning = label_pruning
823
823
self ._sublabels = [1 , ]
824
824
825
825
def base (self , base ):
@@ -895,7 +895,7 @@ def __call__(self, x, pos=None):
895
895
exponent = np .round (fx ) if isDecade else np .floor (fx )
896
896
coeff = np .round (x / b ** exponent )
897
897
898
- if self .sublabel_filtering and coeff not in self ._sublabels :
898
+ if self .label_pruning and coeff not in self ._sublabels :
899
899
return ''
900
900
if not isDecade and self .labelOnlyBase :
901
901
return ''
@@ -976,10 +976,10 @@ def __call__(self, x, pos=None):
976
976
fx = math .log (abs (x )) / math .log (b )
977
977
978
978
isDecade = is_close_to_int (fx )
979
- exponent = np .round (fx ) if is_decade else np .floor (fx )
979
+ exponent = np .round (fx ) if isDecade else np .floor (fx )
980
980
coeff = np .round (abs (x ) / b ** exponent )
981
981
982
- if self .sublabel_filtering and coeff not in self ._sublabels :
982
+ if self .label_pruning and coeff not in self ._sublabels :
983
983
return ''
984
984
if not isDecade and self .labelOnlyBase :
985
985
return ''
@@ -1039,7 +1039,7 @@ def __call__(self, x, pos=None):
1039
1039
else :
1040
1040
base = '%s' % b
1041
1041
1042
- if self .sublabel_filtering and coeff not in self ._sublabels :
1042
+ if self .label_pruning and coeff not in self ._sublabels :
1043
1043
return ''
1044
1044
if not is_decade and self .labelOnlyBase :
1045
1045
return ''
0 commit comments