Skip to content

Commit 7f4e4b5

Browse files
committed
Add test for case and update autoformatter.minute
1 parent d8491d9 commit 7f4e4b5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/tests/test_dates.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,12 @@ def callable_formatting_function(dates, _):
328328
[r'Jan$\mathdefault{\;%02d\;1990}$' % day for day in range(1, 32, 3)]),
329329
(datetime.timedelta(hours=20),
330330
[r'$\mathdefault{%02d{:}00{:}00}$' % hour for hour in range(0, 21, 2)]),
331+
(datetime.timedelta(minutes=10),
332+
[r'$\mathdefault{01\;00{:}%02d}$' % minu for minu in range(0, 11)]),
331333
])
332334
def test_date_formatter_usetex(delta, expected):
335+
plt.rcParams["date.autoformatter.minute"] = "%d %H:%M"
336+
333337
d1 = datetime.datetime(1990, 1, 1)
334338
d2 = d1 + delta
335339

0 commit comments

Comments
 (0)