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 8c55381 commit 0c2f104Copy full SHA for 0c2f104
lib/matplotlib/tests/test_datetime.py
@@ -31,18 +31,7 @@ def test_arrow(self):
31
def test_axhline(self):
32
mpl.rcParams["date.converter"] = 'concise'
33
fig, ax = plt.subplots(layout='constrained')
34
- birth_date = np.array([datetime.datetime(2020, 4, 10),
35
- datetime.datetime(2020, 5, 30),
36
- datetime.datetime(2020, 10, 12),
37
- datetime.datetime(2020, 11, 15)])
38
- year_start = datetime.datetime(2020, 1, 1)
39
- year_end = datetime.datetime(2020, 12, 31)
40
- age = [21, 53, 20, 24]
41
- ax.set_xlabel('Birth Date')
42
- ax.set_ylabel('Age')
43
- ax.set_ylim(bottom=year_start, top=year_end)
44
- ax.bar(x=age, height=birth_date)
45
- ax.axhline(y=datetime.datetime(2020, 6, 1))
+ ax.axhline(y=datetime.datetime(2020, 6, 1), xmin=0.2, xmax=0.8)
46
47
@pytest.mark.xfail(reason="Test for axhspan not written yet")
48
@mpl.style.context("default")
0 commit comments