8000
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.
2 parents 518b268 + d97c8a9 commit 840e4b7Copy full SHA for 840e4b7
lib/matplotlib/tests/test_datetime.py
@@ -83,11 +83,19 @@ def test_axline(self):
83
fig, ax = plt.subplots()
84
ax.axline(...)
85
86
- @pytest.mark.xfail(reason="Test for axvline not written yet")
87
@mpl.style.context("default")
88
def test_axvline(self):
89
- fig, ax = plt.subplots()
90
- ax.axvline(...)
+ mpl.rcParams["date.converter"] = 'concise'
+ fig, (ax1, ax2, ax3) = plt.subplots(3, 1, layout='constrained')
+ ax1.set_xlim(left=datetime.datetime(2020, 4, 1),
91
+ right=datetime.datetime(2020, 8, 1))
92
+ ax2.set_xlim(left=np.datetime64('2005-01-01'),
93
+ right=np.datetime64('2005-04-01'))
94
+ ax3.set_xlim(left=datetime.datetime(2023, 9, 1),
95
+ right=datetime.datetime(2023, 11, 1))
96
+ ax1.axvline(x=datetime.datetime(2020, 6, 3), ymin=0.5, ymax=0.7)
97
+ ax2.axvline(np.datetime64('2005-02-25T03:30'), ymin=0.1, ymax=0.9)
98
+ ax3.axvline(x=datetime.datetime(2023, 10, 24), ymin=0.4, ymax=0.7)
99
100
101
def test_axvspan(self):
0 commit comments