File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -890,14 +890,20 @@ def iter_ticks(self):
890
890
Iterate through all of the major and minor ticks.
891
891
"""
892
892
majorLocs = self .major .locator ()
893
- hasLabel = self .major .locator .show_tick_label (majorLocs )
893
+ try :
894
+ hasLabel = self .major .locator .show_tick_label (majorLocs )
895
+ except AttributeError :
896
+ hasLabel = np .ones (np .asarray (majorLocs ).size , dtype = np .bool )
894
897
majorTicks = self .get_major_ticks (len (majorLocs ))
895
898
self .major .formatter .set_locs (majorLocs )
896
899
majorLabels = [self .major .formatter (val , i ) if hasLabel [i ] else ''
897
900
for i , val in enumerate (majorLocs )]
898
901
899
902
minorLocs = self .minor .locator ()
900
- hasLabel = self .major .locator .show_tick_label (minorLocs )
903
+ try :
904
+ hasLabel = self .major .locator .show_tick_label (minorLocs )
905
+ except AttributeError :
906
+ hasLabel = np .ones (np .asarray (minorLocs ).size , dtype = np .bool )
901
907
minorTicks = self .get_minor_ticks (len (minorLocs ))
902
908
self .minor .formatter .set_locs (minorLocs )
903
909
minorLabels = [self .minor .formatter (val , i ) if hasLabel [i ] else ''
Original file line number Diff line number Diff line change @@ -1625,7 +1625,7 @@ def show_tick_label(self, ticklocs):
1625
1625
numdec = abs (vmax - vmin )
1626
1626
1627
1627
if numdec > 3 :
1628
- sublabel = set ((1 ))
1628
+ sublabel = set ((1 , ))
1629
1629
elif numdec > 2 :
1630
1630
sublabel = set ((1 , 3 ))
1631
1631
elif numdec > 1 :
You can’t perform that action at this time.
0 commit comments