Skip to content

Commit 00461b7

Browse files
committed
add image comparison test and baseline image
1 parent 063cb88 commit 00461b7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/matplotlib/tests/test_polar.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,3 +481,16 @@ def test_polar_neg_theta_lims():
481481
ax.set_thetalim(-np.pi, np.pi)
482482
labels = [l.get_text() for l in ax.xaxis.get_ticklabels()]
483483
assert labels == ['-180°', '-135°', '-90°', '-45°', '0°', '45°', '90°', '135°']
484+
485+
486+
@image_comparison(baseline_images=['polar_errorbar'], remove_text=False,
487+
extensions=['png'], style='mpl20')
488+
def test_polar_errorbar():
489+
theta = np.arange(0, 2 * np.pi, np.pi / 8)
490+
r = theta / np.pi / 2 + 0.5
491+
492+
fig = plt.figure(figsize=(10, 10))
493+
ax = fig.add_subplot(projection='polar')
494+
ax.set_theta_zero_location("N")
495+
ax.set_theta_direction(-1)
496+
ax.errorbar(theta, r, xerr=0.1, yerr=0.1, capsize=7, fmt="o", c="seagreen")

0 commit comments

Comments
 (0)