It would be easier if there were some code to reproduce the problem - it wouldn’t have to be the actual data you are using.
I wasn’t able to reproduce the problem with the following code:
import mpl_toolkits.basemap as bm
import matplotlib.pyplot as plt
#Upper Left ( -11.1339000, 55.8714000) ( 11d 8’ 2.04"W, 55d52’17.04"N)
#Lower Left ( -11.1339000, 50.9251367) ( 11d 8’ 2.04"W, 50d55’30.49"N)
#Upper Right ( -4.8622296, 55.8714000) ( 4d51’44.03"W, 55d52’17.04"N)
#Lower Right ( -4.8622296, 50.9251367) ( 4d51’44.03"W, 50d55’30.49"N)
#Center ( -7.9980648, 53.3982684) ( 7d59’53.03"W, 53d23’53.77"N)
im = plt.imread(‘ireland_amo_2010284_geo.tif’)
extent = [left, right, bottom, top]
extent = [-11.1339000, -4.8622296, 50.9251367, 55.8714000]
m = bm.Basemap(projection=‘cyl’,
llcrnrlat=extent, urcrnrlat=extent, resolution='i')
Your data appears to be a long way off. Are you certain of the bounds that you are setting? Are you using plt.imshow or doing some other operation to draw (e.g. contour)?
On 12 March 2013 15:00, Hearne, Mike <mhearne@…924…> wrote:
The relevant code is:
It’s kind of hard to post code that’s reproducible (lots of
dependencies on code and data), but I’ll attach an image at high
latitudes that demonstrates the problem.
The image is a shaded relief of topography, and the coastlines are
drawn in black.
The topography is cut from a large ESRI format BIL (Band Interleaved
by Line) file, and it’s bounds define the boundaries of the map. The
image data is NOT projected (it’s in lat/lon).
On Tue, Mar 12, 2013 at 3:46 AM, Phil Elson <pelson.pub@…287…> wrote:
Do you have any code or an image to show the problem?
On 11 March 2013 20:44, Hearne, Mike <mhearne@…924…> wrote:
I have an issue with basemap.imshow() at higher latitudes - namely the
image (high-res topography, in this case) becomes distorted with
respect to the coastlines the higher I go. I assume it has to do
with the image pixels becoming more non-square the higher I go in
I found this discussion:
where Jeff indicates that the user is using a non-rectangular map
projection. I’m thinking that is perhaps my problem (I’m using
Transverse Mercator), but I’m not sure which projections Basemap
supports that are rectangular.
Or perhaps it’s something else entirely.
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave™: Endpoint Security, Q1 2013 and “remains a good choice” in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
Matplotlib-users mailing list