Skip to content

MNT: Add test for aitoff-projection #15092

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 1 commit into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,23 @@ def test_polar_rlim_zero():
assert ax.get_ylim()[0] == 0


@image_comparison(['aitoff_proj'], extensions=["png"],
remove_text=True, style='mpl20')
def test_aitoff_proj():
"""
Test aitoff projection ref.:
https://github.com/matplotlib/matplotlib/pull/14451
"""
x = np.linspace(-np.pi, np.pi, 20)
y = np.linspace(-np.pi / 2, np.pi / 2, 20)
X, Y = np.meshgrid(x, y)

fig, ax = plt.subplots(figsize=(8, 4.2),
subplot_kw=dict(projection="aitoff"))
ax.grid()
ax.plot(X.flat, Y.flat, 'o', markersize=4)


@image_comparison(['axvspan_epoch'])
def test_axvspan_epoch():
from datetime import datetime
Expand Down