Skip to content

Fix containment and subslice optim. for steps. #6645

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 12, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Adapt drawstyles test.
Remove duplicated test as well.
  • Loading branch information
anntzer committed Jun 29, 2016
commit e7dd0e3e917630a43e760a892765e846d2515a31
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4460,12 +4460,6 @@ def test_ls_ds_conflict():
linestyle='steps-pre:', drawstyle='steps-post')


@cleanup
def test_ls_ds_conflict():
assert_raises(ValueError, plt.plot, range(32),
linestyle='steps-pre:', drawstyle='steps-post')


@image_comparison(baseline_images=['date_timezone_x'], extensions=['png'])
def test_date_timezone_x():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is duplicated (see the lines just above).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that is a good reason to remove it.

# Tests issue 5575
Expand Down
20 changes: 11 additions & 9 deletions lib/matplotlib/tests/test_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,18 @@ def test_valid_linestyles():
line.set_linestyle('aardvark')


@cleanup
@image_comparison(baseline_images=['drawstyle_variants'], remove_text=True,
extensions=["png"])
def test_drawstyle_variants():
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
for ds in ("default", "steps-mid", "steps-pre", "steps-post",
"steps", None):
ax.plot(range(10), drawstyle=ds)

fig.canvas.draw()
assert True
fig, axs = plt.subplots(6)
dss = ["default", "steps-mid", "steps-pre", "steps-post", "steps", None]
# We want to check that drawstyles are properly handled even for very long
# lines (for which the subslice optimization is on); however, we need
# to zoom in so that the difference between the drawstyles is actually
# visible.
for ax, ds in zip(axs.flat, dss):
ax.plot(range(2000), drawstyle=ds)
ax.set(xlim=(0, 2), ylim=(0, 2))


@cleanup
Expand Down