Skip to content

Commit 65e4f29

Browse files
author
egor
committed
Fix #190
Signed-off-by: egor <egor@sourced.tech>
1 parent a8dc92e commit 65e4f29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

labours.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ def dist_callback(x, y):
13501350
interval = int(numpy.ceil(num_months / target_num_labels))
13511351
if interval >= 8:
13521352
interval = int(numpy.ceil(num_months / (12 * target_num_labels)))
1353-
axes[-1].xaxis.set_major_locator(matplotlib.dates.YearLocator(interval=interval))
1353+
axes[-1].xaxis.set_major_locator(matplotlib.dates.YearLocator(base=max(1, interval // 12)))
13541354
axes[-1].xaxis.set_major_formatter(matplotlib.dates.DateFormatter("%Y"))
13551355
else:
13561356
axes[-1].xaxis.set_major_locator(matplotlib.dates.MonthLocator(interval=interval))

0 commit comments

Comments
 (0)