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

Appearance settings

Commit 84496fa

Browse filesBrowse files
committed
Add test
1 parent 5bb29e0 commit 84496fa
Copy full SHA for 84496fa

File tree

2 files changed

+21
-0
lines changed
Filter options

2 files changed

+21
-0
lines changed
Loading

‎lib/matplotlib/tests/test_artist.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_artist.py
+21Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import matplotlib.path as mpath
1313
import matplotlib.transforms as mtrans
1414
import matplotlib.collections as mcollections
15+
import matplotlib as mpl
1516
from matplotlib.testing.decorators import image_comparison, cleanup
1617

1718
from nose.tools import (assert_true, assert_false)
@@ -176,6 +177,26 @@ def test_remove():
176177
assert_true(ax.stale)
177178

178179

180+
@image_comparison(baseline_images=["default_edges"], remove_text=True,
181+
extensions=['png'], style='default')
182+
def test_default_edges():
183+
with mpl.rc_context({'patch.linewidth': None}):
184+
fig, [[ax1, ax2], [ax3, ax4]] = plt.subplots(2, 2)
185+
186+
ax1.plot(np.arange(10), np.arange(10), 'x',
187+
np.arange(10) + 1, np.arange(10), 'o')
188+
ax2.bar(np.arange(10), np.arange(10))
189+
ax3.text(0, 0, "BOX", size=24, bbox=dict(boxstyle='sawtooth'))
190+
ax3.set_xlim((-1, 1))
191+
ax3.set_ylim((-1, 1))
192+
pp1 = mpatches.PathPatch(
193+
mpath.Path([(0, 0), (1, 0), (1, 1), (0, 0)],
194+
[mpath.Path.MOVETO, mpath.Path.CURVE3,
195+
mpath.Path.CURVE3, mpath.Path.CLOSEPOLY]),
196+
fc="none", transform=ax4.transData)
197+
ax4.add_patch(pp1)
198+
199+
179200
if __name__ == '__main__':
180201
import nose
181202
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.