3
我需要在地圖上繪製數據站點。例如,調查「DEPROAS」有五個電臺,所以我需要繪製並插入圖例指南。但是,當我這樣做時,不是隻繪製一次(代表這五個臺),而是繪製五個點。任何想法?圖和下面的代碼。圖例標記出現多次
#### DEPROAS #### - Cabo Frio
fcf1=[-22-(59.030/60),-42-(07.340/60)]
fcf2=[-23-(05.444/60),-41-(54.700/60)]
fcf=[fcf1,fcf2]
fcf=np.array(fcf)
lat_fcf = fcf[0:len(fcf),0]
lon_fcf = fcf[0:len(fcf),1]
x_fcf,y_fcf=m(lon_fcf,lat_fcf)
plt.plot(x_fcf[0],y_fcf[0], 'o', label='DEPROAS', color='#88ff4d', zorder = 3000)
plt.plot(x_fcf[1],y_fcf[1], 'o', label='DEPROAS', color='#88ff4d', zorder = 3000)
#### DEPROAS #### - Ubatuba
fub1=[-23-(43.560/60),-44-(53.860/60)]
fub2=[-24-(04.028/60),-44-(39.005/60)] ##rever nos dados no lab
fub=[fub1,fub2]
fub=np.array(fub)
lat_fub = fub[0:len(fub),0]
lon_fub = fub[0:len(fub),1]
x_fub,y_fub=m(lon_fub,lat_fub)
plt.plot(x_fub[0],y_fub[0], 'o', label = 'DEPROAS', color='#88ff4d', zorder = 3000)
plt.plot(x_fub[1],y_fub[1], 'o', label = 'DEPROAS', color='#88ff4d', zorder = 3000)
#### DEPROAS #### - Guanabara
fbg1=[-23-(18.34/60),-42-(45.81/60)]
fbg=[fbg1]
fbg=np.array(fbg)
lat_fbg = fbg[0:len(fbg),0]
lon_fbg = fbg[0:len(fbg),1]
x_fbg,y_fbg=m(lon_fbg,lat_fbg)
plt.plot(x_fbg[0],y_fbg[0], 'o', label = 'DEPROAS', color='#88ff4d', zorder = 3000)
它的工作!謝謝你,寧靜! –