Skip to content
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

custom_projection_example.py is completely out of date #6865

Closed
anntzer opened this issue Jul 31, 2016 · 5 comments
Closed

custom_projection_example.py is completely out of date #6865

anntzer opened this issue Jul 31, 2016 · 5 comments
Labels
Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Documentation
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Jul 31, 2016

Basically the whole example (http://matplotlib.org/examples/api/custom_projection_example.html) seems to be an outdated implementation of the Hammer projection (available at https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/projections/geo.py). In fact it is so outdated that it doesn't manage to make the lines become "curved" like they should. Instead, just copy-pasting the if __name__ == "__main__" block at the end to use the standard hammer projection results in a correct plot:

import matplotlib.pyplot as plt

plt.subplot(111, projection="hammer")
p = plt.plot([-1, 1, 1], [-1, -1, 1], "o-")
plt.grid(True)

plt.show()

hammer

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Aug 3, 2016
@tacaswell
Copy link
Member

This is broken back as far as we have hosted built docs: http://matplotlib.org/1.2.1/examples/api/custom_projection_example.html

👍 on reducing the example to the code in the OP of this issue.

@tacaswell
Copy link
Member

Looks like this is mostly @mdboom 's work from 2008.

@anntzer anntzer added the Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues label Aug 3, 2016
rougier added a commit to rougier/matplotlib that referenced this issue Sep 14, 2016
tacaswell added a commit that referenced this issue Sep 16, 2016
DOC: Fix example following comments in  issue #6865
tacaswell added a commit that referenced this issue Sep 16, 2016
DOC: Fix example following comments in  issue #6865
@NelleV
Copy link
Member

NelleV commented Oct 15, 2016

If I am not mistaken, this is fixed in master. @anntzer care to check?

@QuLogic
Copy link
Member

QuLogic commented Oct 15, 2016

Fixed by #7111.

@QuLogic QuLogic closed this as completed Oct 15, 2016
@anntzer
Copy link
Contributor Author

anntzer commented Oct 15, 2016

I'm not convinced that it was worth copying the entire implementation of the Hammer projection into the example but I guess it's fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Documentation
Projects
None yet
Development

No branches or pull requests

4 participants