Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Smoke Test for Axes.step#27162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
0taj wants to merge3 commits intomatplotlib:mainfrom0taj:test_fill
Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletionslib/matplotlib/tests/test_datetime.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -343,11 +343,24 @@ def test_stem(self):
fig, ax = plt.subplots()
ax.stem(...)

@pytest.mark.xfail(reason="Test for step not written yet")
@mpl.style.context("default")
def test_step(self):
fig, ax = plt.subplots()
ax.step(...)
mpl.rcParams["date.converter"] = "concise"
limit = 5
fig, (ax1, ax2, ax3, ax4) = plt.subplots(4, 1, layout="constrained")

start_date = datetime.date(2023, 1, 1)
x_date = [start_date + datetime.timedelta(days=i) for i in range(1, limit)]
y_date = [start_date + datetime.timedelta(days=i) for i in range(1, limit)]
x_ranges = np.array(range(1, limit))
y_ranges = np.array(range(1, limit))

ax1.step(x_ranges, y_date, 'g', where='pre', label='pre')
ax2.step(x_date, y_ranges, 'b', where='mid', label='mid')
ax3.step(x_date, y_date, 'r', where='post', label='post')
ax4.step("date", "signal",
data={"date": x_date, "signal": y_ranges},
where='mid', label='mid')

@pytest.mark.xfail(reason="Test for streamplot not written yet")
@mpl.style.context("default")
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp