FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MNT: Add test for aitoff-projection by ImportanceOfBeingErnest · Pull Request #15092 · matplotlib/matplotlib · GitHub

Repository navigation

MNT: Add test for aitoff-projection - #15092

Merged
jklymak merged 1 commit into
matplotlib:masterfrom
ImportanceOfBeingErnest:aitoff-proj-test
Aug 22, 2019
Merged

jklymak merged 1 commit into
matplotlib:masterfrom
ImportanceOfBeingErnest:aitoff-proj-test

Conversation

ImportanceOfBeingErnest commented Aug 20, 2019 •
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

Closes #14503

Adds test for fix in #14451

Unfortunately, the initial problem occured at draw time, so one will need to use an image comparison test.

Running the test in matplotlib 3.1 results in

Running the test in current master results in

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

ImportanceOfBeingErnest added this to the v3.2.0 milestone Aug 20, 2019
Comment thread lib/matplotlib/tests/test_axes.py Outdated
https://github.com/matplotlib/matplotlib/pull/14451
"""
np.random.seed(42)
ra_random = np.random.rand(20) * 2 * np.pi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can these be a structured grid (or line of points) instead of random points? That way it's easier to understand changes to the positioning of the points due to any future code changes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ok, changed to use a grid. See updated post above.

Comment thread lib/matplotlib/tests/test_axes.py Outdated

fig, ax = plt.subplots(figsize=(8, 4.2),
subplot_kw=dict(projection="aitoff"))
ax.tick_params(left=False, bottom=False,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why remove the ticks?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Because they aren't relevant for what's being tested. Would you like me to include them?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If we add them then the image is also testing the tick layout, and will be a good catch of any changes in ticking changes for this projection.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

aitoff projection doesn't have ticks, and the labels are excluded by the remove_text=True option in the @image_comparison decorator (I cannot get the matching freetype to install on my system). But I went to put in a grid now, which would test the tick locations.

jklymak merged commit a0b8cae into matplotlib:master Aug 22, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a test for #14451

4 participants


Back | FazBrowse Home | New Git URL