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

[DOC] Fix example following comments in issue #6865 #7111

Merged
merged 2 commits into from
Sep 16, 2016

Conversation

rougier
Copy link
Member

@rougier rougier commented Sep 14, 2016

I fixed the example by extracting the relevant code from geo.py and copying back comments from the old example.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Sep 14, 2016
# user to select the projection, i.e. ``subplot(111,
# projection='custom_hammer')``.
name = 'custom_hammer'
class ThetaFormatter(Formatter):
Copy link
Member

Choose a reason for hiding this comment

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

I think you can import this from matplotlib.projections.polar.ThetaFormatter.

Copy link
Member

Choose a reason for hiding this comment

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

I think part of the exercise here is to write one mostly from scratch.

@@ -271,8 +268,8 @@ def format_coord(self, lon, lat):

In this case, we want them to be displayed in degrees N/S/E/W.
"""
lon = np.degrees(lon)
lat = np.degrees(lat)
lon = lon * (180.0 / np.pi)
Copy link
Member

Choose a reason for hiding this comment

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

Why change this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Cause it is how it is writtern in geo.py

longitude_cap = np.radians(degrees)
# Change the xaxis gridlines transform so that it draws from
# -degrees to degrees, rather than -pi to pi.
self._longitude_cap = degrees * (np.pi / 180.0)
Copy link
Member

Choose a reason for hiding this comment

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

Why change this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Cause it is how it is writtern in geo.py

A custom class for the Aitoff-Hammer projection, an equal-area map
projection.

http://en.wikipedia.org/wiki/Hammer_projection
Copy link
Member

Choose a reason for hiding this comment

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

https

Copy link
Member Author

Choose a reason for hiding this comment

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

?

http://en.wikipedia.org/wiki/Hammer_projection
"""

# The projection must specify a name. This will be used be the
Copy link
Member

@QuLogic QuLogic Sep 14, 2016

Choose a reason for hiding this comment

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

s/be the/by the/

@tacaswell tacaswell merged commit 5e65908 into matplotlib:master Sep 16, 2016
tacaswell added a commit that referenced this pull request Sep 16, 2016
DOC: Fix example following comments in  issue #6865
@tacaswell
Copy link
Member

backported to v2.x as 07c8506

Thanks @rougier ! Your work on these examples is super appreciated!

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Dec 7, 2016
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.

None yet

5 participants