-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Conversation
# user to select the projection, i.e. ``subplot(111, | ||
# projection='custom_hammer')``. | ||
name = 'custom_hammer' | ||
class ThetaFormatter(Formatter): |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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/
DOC: Fix example following comments in issue #6865
I fixed the example by extracting the relevant code from geo.py and copying back comments from the old example.