File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -883,14 +883,20 @@ def iter_ticks(self):
883
883
Iterate through all of the major and minor ticks.
884
884
"""
885
885
majorLocs = self .major .locator ()
886
- hasLabel = self .major .locator .show_tick_label (majorLocs )
886
+ try :
887
+ hasLabel = self .major .locator .show_tick_label (majorLocs )
888
+ except AttributeError :
889
+ hasLabel = np .ones (np .asarray (majorLocs ).size , dtype = np .bool )
887
890
majorTicks = self .get_major_ticks (len (majorLocs ))
888
891
self .major .formatter .set_locs (majorLocs )
889
892
majorLabels = [self .major .formatter (val , i ) if hasLabel [i ] else ''
890
893
for i , val in enumerate (majorLocs )]
891
894
892
895
minorLocs = self .minor .locator ()
893
- hasLabel = self .major .locator .show_tick_label (minorLocs )
896
+ try :
897
+ hasLabel = self .major .locator .show_tick_label (minorLocs )
898
+ except AttributeError :
899
+ hasLabel = np .ones (np .asarray (minorLocs ).size , dtype = np .bool )
894
900
minorTicks = self .get_minor_ticks (len (minorLocs ))
895
901
self .minor .formatter .set_locs (minorLocs )
896
902
minorLabels = [self .minor .formatter (val , i ) if hasLabel [i ] else ''
Original file line number Diff line number Diff line change @@ -1932,7 +1932,7 @@ def show_tick_label(self, ticklocs):
1932
1932
numdec = abs (vmax - vmin )
1933
1933
1934
1934
if numdec > 3 :
1935
- sublabel = set ((1 ))
1935
+ sublabel = set ((1 , ))
1936
1936
elif numdec > 2 :
1937
1937
sublabel = set ((1 , 3 ))
1938
1938
elif numdec > 1 :
You can’t perform that action at this time.
0 commit comments