8000
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 f650bf8 commit 40f58b0Copy full SHA for 40f58b0
lib/matplotlib/ticker.py
@@ -739,7 +739,8 @@ def format_data_short(self, value):
739
delta = abs(neighbor_values - value).max()
740
else:
741
# Rough approximation: no more than 1e4 divisions.
742
- delta = np.diff(self.axis.get_view_interval()) / 1e4
+ a, b = self.axis.get_view_interval()
743
+ delta = (b - a) / 1e4
744
# If e.g. value = 45.67 and delta = 0.02, then we want to round to
745
# 2 digits after the decimal point (floor(log10(0.02)) = -2);
746
# 45.67 contributes 2 digits before the decimal point
0 commit comments