10000 FIX: · matplotlib/matplotlib@a2b5f89 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2b5f89

Browse files
committed
FIX:
1 parent 3d4976b commit a2b5f89

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

lib/matplotlib/axis.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,58 +1028,9 @@ def _update_ticks(self, renderer):
10281028
ihigh = locs[-1]
10291029
tick_tups = [ti for ti in tick_tups if ilow <= ti[1] <= ihigh]
10301030

1031-
<<<<<<< HEAD
1032-
# so that we don't lose ticks on the end, expand out the interval ever
1033-
# so slightly. The "ever so slightly" is defined to be the width of a
1034-
# half of a pixel. We don't want to draw a tick that even one pixel
1035-
# outside of the defined axis interval.
1036-
if interval[0] <= interval[1]:
1037-
interval_expanded = interval
1038-
else:
1039-
interval_expanded = interval[1], interval[0]
1040-
1041-
if hasattr(self, '_get_pixel_distance_along_axis'):
1042-
# normally, one does not want to catch all exceptions that
1043-
# could possibly happen, but it is not clear exactly what
1044-
# exceptions might arise from a user's projection (their
1045-
# rendition of the Axis object). So, we catch all, with
1046-
# the idea that one would rather potentially lose a tick
1047-
# from one side of the axis or another, rather than see a
1048-
# stack trace.
1049-
# We also catch users warnings here. These are the result of
1050-
# invalid numpy calculations that may be the result of out of
1051-
# bounds on axis with finite allowed intervals such as geo
1052-
# projections i.e. Mollweide.
1053-
with np.errstate(invalid='ignore'):
1054-
try:
1055-
ds1 = self._get_pixel_distance_along_axis(
1056-
interval_expanded[0], -0.5)
1057-
except Exception:
1058-
cbook._warn_external("Unable to find pixel distance "
1059-
"along axis for interval padding of "
1060-
"ticks; assuming no interval "
1061-
"padding needed.")
1062-
ds1 = 0.0
1063-
if np.isnan(ds1):
1064-
ds1 = 0.0
1065-
try:
1066-
ds2 = self._get_pixel_distance_along_axis(
1067-
interval_expanded[1], +0.5)
1068-
except Exception:
1069-
cbook._warn_external("Unable to find pixel distance "
1070-
"along axis for interval padding of "
1071-
"ticks; assuming no interval "
1072-
"padding needed.")
1073-
ds2 = 0.0
1074-
if np.isnan(ds2):
1075-
ds2 = 0.0
1076-
interval_expanded = (interval_expanded[0] - ds1,
1077-
interval_expanded[1] + ds2)
1078-
=======
10791031
if interval[1] <= interval[0]:
10801032
interval = interval[1], interval[0]
10811033
inter = self.get_transform().transform(interval)
1082-
>>>>>>> MNT: simplify valid tick logic
10831034

10841035
ticks_to_draw = []
10851036
for tick, loc, label in tick_tups:

0 commit comments

Comments
 (0)
0