Skip to content

Fix 2542 #2544

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 3 commits into from
Nov 8, 2013
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
Add test for new spine capstyle, workaround PDF rendering errors in l…
…ow-dpi tests.
  • Loading branch information
pwuertz committed Nov 8, 2013
commit ed67aa3d97dfa4e7d5379577f4ef352b25258a6b
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
542 changes: 12 additions & 530 deletions lib/matplotlib/tests/baseline_images/test_image/rasterize_10dpi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions lib/matplotlib/tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,14 @@ def test_rasterize_dpi():

axes[2].plot([0,1],[0,1], linewidth=20.)
axes[2].set(xlim = (0,1), ylim = (-1, 2))

# Low-dpi PDF rasterization errors prevent proper image comparison tests.
# Hide detailed structures like the axes spines.
for ax in axes:
ax.set_xticks([])
ax.set_yticks([])
for spine in ax.spines.values():
spine.set_visible(False)

rcParams['savefig.dpi'] = 10

Expand Down
9 changes: 9 additions & 0 deletions lib/matplotlib/tests/test_spines.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ def test_spines_data_positions():
ax.spines['bottom'].set_position('zero')
ax.set_xlim([-2,2])
ax.set_ylim([-2,2])

@image_comparison(baseline_images=['spines_capstyle'])
def test_spines_capstyle():
# issue 2542
plt.rc('axes', linewidth=20)
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.set_xticks([])
ax.set_yticks([])