i'm trying plot coordinate points on world map. use cylindrical projection 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 points (about 1000) included in [-3°:-3°] latitude range , squeezed tight line near equator, once plotted in whole world map.
hence, i'd "stretch" the, let's say, [-5°:+5°] latitude range, losing proportionality of projection, in order zoom region of interest , widen distance among points. tried limiting llcrnrlat
, urcrnrlat
parameters, cropped region of interest, without zooming or enlarging image. how can this?
if don't care losing proportionally can pass basemap fix_aspect
parameter (that true 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)
Comments
Post a Comment