Thanks to visit codestin.com Credit goes to github.com
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.
1 parent 4b66272 commit f52afbfCopy full SHA for f52afbf
1 file changed
lib/matplotlib/ticker.py
@@ -559,6 +559,9 @@ def _set_offset(self, range):
559
if locs is None or not len(locs) or range == 0:
560
self.offset = 0
561
return
562
+ vmin, vmax = sorted(self.axis.get_view_interval())
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)
567
ave_oom = math.floor(math.log10(np.mean(np.absolute(locs))))
0 commit comments