Skip to content

Commit f812e60

Browse files
aitoff-proj-test
1 parent 0290a7e commit f812e60

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

lib/matplotlib/tests/test_axes.py

+17
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,23 @@ def test_polar_rlim_zero():
797797
assert ax.get_ylim()[0] == 0
798798

799799

800+
@image_comparison(['aitoff_proj'], extensions=["png"],
801+
remove_text=True, style='mpl20')
802+
def test_aitoff_proj():
803+
"""
804+
Test aitoff projection ref.:
805+
https://github.com/matplotlib/matplotlib/pull/14451
806+
"""
807+
x = np.linspace(-np.pi, np.pi, 20)
808+
y = np.linspace(-np.pi / 2, np.pi / 2, 20)
809+
X, Y = np.meshgrid(x, y)
810+
811+
fig, ax = plt.subplots(figsize=(8, 4.2),
812+
subplot_kw=dict(projection="aitoff"))
813+
ax.grid()
814+
ax.plot(X.flat, Y.flat, 'o', markersize=4)
815+
816+
800817
@image_comparison(['axvspan_epoch'])
801818
def test_axvspan_epoch():
802819
from datetime import datetime

0 commit comments

Comments
 (0)