error of drawing map from shape file in Python 3.2 basemap

usact2012 at gmail.com usact2012 at gmail.com
Sat Feb 14 14:00:21 EST 2015


I am working on drawing map from shape file in Python 3.2 basemap.

But, the longitude values at the bottom axis are only shown partially. Also, all latitude values are missing.

Here is my python code.

import shapefile as sf
import sys
import numpy as np
import matplotlib.pylab as plt
from mpl_toolkits.basemap import Basemap

 map = Basemap(projection='stere', lon_0=-106.4, lat_0= 31.9, lat_ts  = 31.9, \
               llcrnrlat=31.7, urcrnrlat= 31.85, \
               llcrnrlon=-106.5 , urcrnrlon= -106.1, \
               rsphere=6371200., resolution='l', area_thresh=1000)

 plt.figure(num=None, figsize=(10, 8), dpi=80, facecolor='w', edgecolor='k')

parallels = np.arange(31.7, 31.85, 0.25)

map.drawparallels(parallels, labels=[0, 0, 0, 1] , fontsize=10, labelstyle='+/-', dashes=[2, 2])

meridians = np.arange (-106.5, -106.1, 0.25)

map.drawmeridians(meridians, labels=[0, 0, 0, 1], fontsize=10, labelstyle='+/-' , dashes=[2, 2])

No matter how I changed the labels, the latitude/longitude legend values are still missing.



More information about the Python-list mailing list