Skip to content

Commit 9746040

Browse files
committed
Update ConciseDateFormatter
1 parent 27aaf0c commit 9746040

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/dates.py

+3
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,9 @@ def format_ticks(self, values):
802802
# 3: hours, 4: minutes, 5: seconds, 6: microseconds
803803
for level in range(5, -1, -1):
804804
if len(np.unique(tickdate[:, level])) > 1:
805+
# if level is less than 2, a year is already present in the axis
806+
if (level < 2):
807+
self.show_offset = False
805808
break
806809
elif level == 0:
807810
# all tickdate are the same, so only micros might be different

0 commit comments

Comments
 (0)