Skip to content

Commit 8de9241

Browse files
committed
Fixed a mistake with the Hammer projection in the geo module.
Thanks to Matthias Plum for reporting and Tobias Winchen for confirming. svn path=/branches/v1_0_maint/; revision=8808
1 parent ba8c65d commit 8de9241

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2010-11-22 Fixed error with Hammer projection. - BVR
2+
13
2010-11-12 Fixed the placement and angle of axis labels in 3D plots. - BVR
24

35
2010-11-07 New rc parameters examples.download and examples.directory

lib/matplotlib/projections/geo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def transform(self, ll):
346346
cos_latitude = np.cos(latitude)
347347
sqrt2 = np.sqrt(2.0)
348348

349-
alpha = 1.0 + cos_latitude * np.cos(half_long)
349+
alpha = np.sqrt(1.0 + cos_latitude * np.cos(half_long))
350350
x = (2.0 * sqrt2) * (cos_latitude * np.sin(half_long)) / alpha
351351
y = (sqrt2 * np.sin(latitude)) / alpha
352352
return np.concatenate((x, y), 1)

0 commit comments

Comments
 (0)