I'm trying to plot some coordinate points on a world map. I use a cylindrical projection as follows:
fig = plt.figure(figsize=(18,6))
map = Basemap(projection='cyl', lat_0 = 57, lon_0 = -135, resolution = 'c', area_thresh = 0.1, llcrnrlon=-180.0, llcrnrlat=-7.0, urcrnrlon=180.0, urcrnrlat=7.0)
X, Y = map(LON, LAT)
map.plot(X, Y, "ro", markersize=5)
The problem is that my points (about 1000) are all included in a [-3°:-3°] latitude range and they get all squeezed into a tight line near the equator, once plotted in a whole world map.
Hence, I'd like to "stretch" the, let's say, [-5°:+5°] latitude range, even losing the proportionality of my projection, in order to zoom the region of interest and widen the distance among my points. I tried limiting the llcrnrlat
and urcrnrlat
parameters, but that just cropped the region of interest, without zooming or enlarging the image. How can I do this?
If you don't care about losing the proportionally you can pass to the basemap the fix_aspect
parameter (that is True by default)
map = Basemap(projection='cyl', lat_0 = 57, lon_0 = -135, resolution = 'c', area_thresh = 0.1, llcrnrlon=-180.0, llcrnrlat=-7.0, urcrnrlon=180.0, urcrnrlat=7.0, fix_aspect=False)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With