Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
Next Next commit
TST: update test images
 - update to mpl20 style
 - re-generate as needed
 - bump threshold on pngsuite test
  • Loading branch information
tacaswell committed Aug 29, 2017
commit 25090305364130cb6dd46c9bbc3a8d5c53d3b8b7
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/imshow.pdf
Binary file not shown.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/imshow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
172 changes: 56 additions & 116 deletions lib/matplotlib/tests/baseline_images/test_axes/imshow.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 modified lib/matplotlib/tests/baseline_images/test_axes/imshow_clip.pdf
Binary file not shown.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/imshow_clip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
878 changes: 407 additions & 471 deletions lib/matplotlib/tests/baseline_images/test_axes/imshow_clip.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.
190 changes: 60 additions & 130 deletions lib/matplotlib/tests/baseline_images/test_image/bbox_image_inverted.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 modified lib/matplotlib/tests/baseline_images/test_image/image_clip.pdf
Binary file not shown.
Binary file modified lib/matplotlib/tests/baseline_images/test_image/image_clip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
389 changes: 254 additions & 135 deletions lib/matplotlib/tests/baseline_images/test_image/image_clip.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.
218 changes: 76 additions & 142 deletions lib/matplotlib/tests/baseline_images/test_image/image_cliprect.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.
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.
908 changes: 446 additions & 462 deletions lib/matplotlib/tests/baseline_images/test_image/image_interps.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 modified lib/matplotlib/tests/baseline_images/test_image/imshow.pdf
Binary file not shown.
Binary file modified lib/matplotlib/tests/baseline_images/test_image/imshow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
208 changes: 64 additions & 144 deletions lib/matplotlib/tests/baseline_images/test_image/imshow.svg
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.
Binary file not shown.
52 changes: 26 additions & 26 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.
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.
1,414 changes: 677 additions & 737 deletions lib/matplotlib/tests/baseline_images/test_patheffects/patheffect2.svg
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.
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ def test_nonfinite_limits():


@image_comparison(baseline_images=['imshow', 'imshow'],
remove_text=True)
remove_text=True, style='mpl20')
def test_imshow():
# Create a NxN image
N = 100
Expand All @@ -855,7 +855,7 @@ def test_imshow():
ax.imshow("r", data=data)


@image_comparison(baseline_images=['imshow_clip'])
@image_comparison(baseline_images=['imshow_clip'], style='mpl20')
def test_imshow_clip():
# As originally reported by Gellule Xg <[email protected]>

Expand Down
30 changes: 20 additions & 10 deletions lib/matplotlib/tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
needs_pillow = pytest.mark.xfail(not HAS_PIL, reason='Test requires Pillow')


@image_comparison(baseline_images=['image_interps'])
@image_comparison(baseline_images=['image_interps'], style='mpl20')
def test_image_interps():
'make the basic nearest, bilinear and bicubic interps'
X = np.arange(100)
Expand Down Expand Up @@ -248,7 +248,7 @@ def test_cursor_data():
assert z is None, "Did not get None, got %d" % z


@image_comparison(baseline_images=['image_clip'])
@image_comparison(baseline_images=['image_clip'], style='mpl20')
def test_image_clip():
d = [[1, 2], [3, 4]]

Expand All @@ -258,7 +258,7 @@ def test_image_clip():
im.set_clip_path(patch)


@image_comparison(baseline_images=['image_cliprect'])
@image_comparison(baseline_images=['image_cliprect'], style='mpl20')
def test_image_cliprect():
import matplotlib.patches as patches

Expand All @@ -271,7 +271,8 @@ def test_image_cliprect():
rect = patches.Rectangle(xy=(1,1), width=2, height=2, transform=im.axes.transData)
im.set_clip_path(rect)

@image_comparison(baseline_images=['imshow'], remove_text=True)

@image_comparison(baseline_images=['imshow'], remove_text=True, style='mpl20')
def test_imshow():
import numpy as np
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -334,7 +335,10 @@ def test_image_edges():

assert g != 100, 'Expected a non-green edge - but sadly, it was.'

@image_comparison(baseline_images=['image_composite_background'], remove_text=True)

@image_comparison(baseline_images=['image_composite_background'],
remove_text=True,
style='mpl20')
def test_image_composite_background():
fig = plt.figure()
ax = fig.add_subplot(111)
Expand All @@ -344,7 +348,9 @@ def test_image_composite_background():
ax.set_facecolor((1, 0, 0, 0.5))
ax.set_xlim([0, 12])

@image_comparison(baseline_images=['image_composite_alpha'], remove_text=True)

@image_comparison(baseline_images=['image_composite_alpha'],
remove_text=True)
def test_image_composite_alpha():
"""
Tests that the alpha value is recognized and correctly applied in the
Expand All @@ -370,7 +376,9 @@ def test_image_composite_alpha():
ax.set_ylim([5, 0])


@image_comparison(baseline_images=['rasterize_10dpi'], extensions=['pdf','svg'], remove_text=True)
@image_comparison(baseline_images=['rasterize_10dpi'],
extensions=['pdf', 'svg'],
remove_text=True, style='mpl20')
def test_rasterize_dpi():
# This test should check rasterized rendering with high output resolution.
# It plots a rasterized line and a normal image with implot. So it will catch
Expand Down Expand Up @@ -403,7 +411,8 @@ def test_rasterize_dpi():
rcParams['savefig.dpi'] = 10


@image_comparison(baseline_images=['bbox_image_inverted'], remove_text=True)
@image_comparison(baseline_images=['bbox_image_inverted'], remove_text=True,
style='mpl20')
def test_bbox_image_inverted():
# This is just used to produce an image to feed to BboxImage
image = np.arange(100).reshape((10, 10))
Expand Down Expand Up @@ -449,7 +458,8 @@ def test_get_window_extent_for_AxisImage():

@image_comparison(baseline_images=['zoom_and_clip_upper_origin'],
remove_text=True,
extensions=['png'])
extensions=['png'],
style='mpl20')
def test_zoom_and_clip_upper_origin():
image = np.arange(100)
image = image.reshape((10, 10))
Expand Down Expand Up @@ -727,7 +737,7 @@ def test_imshow_endianess():


@image_comparison(baseline_images=['imshow_masked_interpolation'],
remove_text=True, style='default')
remove_text=True, style='mpl20')
def test_imshow_masked_interpolation():

cm = copy(plt.get_cmap('viridis'))
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_patheffects.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def test_patheffect1():
ax1.grid(True, linestyle="-", path_effects=pe)


@image_comparison(baseline_images=['patheffect2'], remove_text=True)
@image_comparison(baseline_images=['patheffect2'], remove_text=True,
style='mpl20')
def test_patheffect2():

ax2 = plt.subplot(111)
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def test_simple():


@image_comparison(baseline_images=['multi_pickle'],
extensions=['png'], remove_text=True)
extensions=['png'], remove_text=True,
style='mpl20')
def test_complete():
fig = plt.figure('Figure with a label?', figsize=(10, 6))

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/tests/test_png.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


@image_comparison(baseline_images=['pngsuite'], extensions=['png'],
tol=0.02 if on_win else 0)
tol=0.03)
def test_pngsuite():
dirname = os.path.join(
os.path.dirname(__file__),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion lib/mpl_toolkits/tests/test_axes_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

@image_comparison(baseline_images=['imagegrid_cbar_mode'],
extensions=['png'],
remove_text=True)
remove_text=True,
style='mpl20')
def test_imagegrid_cbar_mode_edge():
X, Y = np.meshgrid(np.linspace(0, 6, 30), np.linspace(0, 6, 30))
arr = np.sin(X) * np.cos(Y) + 1j*(np.sin(3*Y) * np.cos(Y/2.))
Expand Down