0

I use this code to plot a projection center over France:

from sys import argv

from numpy import array,histogram

from numpy import *

from math import *

from matplotlib.pyplot import *

from matplotlib.image import *

from mpl_toolkits.basemap import Basemap, shiftgrid

from matplotlib import rcParams

import matplotlib.pyplot as plt

import matplotlib.mlab as mlab

import matplotlib.patches as patches

import matplotlib.path as path

import matplotlib.dates as dt

from numpy import linalg

def continents():

 lat=[]

 lon=[]

 for lig in file('24840.dat') :

   ligne=lig.split()


   if len(ligne[0]) > 1 :

     lon.append(ligne[0])

     lat.append(ligne[1])

   else:

     plot(lon,lat,'k',linewidth=0.5)

     lat=[]

     lon=[]

m = Basemap(width=12000000,height=9000000,projection='lcc',\
            resolution='l',lat_1=42,lat_2=52,lat_0=47,lon_0=8)

m.scatter(xlon,xlat,s=45,c=z,vmin=0,vmax=30,cmap=cm.get_cmap('jet', 45),edgecolors='None')

continents() 

m.drawcountries(linewidth=0.3)

m.drawstates(linewidth=0.3)

ax=colorbar()

xlim(-6,10)

ylim(42,52)


show()

I would like to see France boundaries but it doen not work... Do you see what is missing?

4

0 に答える 0