We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 180a21c + 0163652 commit d39b331Copy full SHA for d39b331
lib/matplotlib/ticker.py
@@ -563,7 +563,7 @@ def _set_offset(self, range):
563
locs = np.asarray(locs)
564
locs = locs[(vmin <= locs) & (locs <= vmax)]
565
ave_loc = np.mean(locs)
566
- if ave_loc: # dont want to take log10(0)
+ if len(locs) and ave_loc: # dont want to take log10(0)
567
ave_oom = math.floor(math.log10(np.mean(np.absolute(locs))))
568
range_oom = math.floor(math.log10(range))
569
0 commit comments