제목이 말하는대로입니다. 내 drawcounties 명령은 오류없이 무시됩니다. 그것은 특정 투영에 대해서만 음모를 꾸미고 있습니까? 문서에 그렇게 쓰여 있지 않습니다.Matplotlib basemap drawcounties가 작동하지 않습니다.
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap, shiftgrid
import scipy
def BasemapParameters():
"""
Sets up basemap.
"""
m = Basemap(projection='mill', llcrnrlon = 230, llcrnrlat = 27,
urcrnrlat = 45, urcrnrlon = 261,
area_thresh = 1000., resolution='i')
m.drawcounties(linewidth=0.5)
m.drawcoastlines(linewidth=0.7)
m.drawcountries(linewidth=0.5)
m.drawstates(linewidth=0.5)
m.drawmapboundary(linewidth=0.7)
def SavePlot(lvl,parameter,region,hour,padding):
"""
Saves figure to file with given properties
"""
plt.savefig('{0}_{1}_{2}_{3}.png'.format(lvl,parameter,region,hour),bbox_inches='tight',pad_inches = padding)
plt.close("all")
print(' "{0}_{1}_{2}_{3}.png" created.'.format(lvl,parameter,region,hour))
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
BasemapParameters()
SavePlot('sfc','3hrpcp','sw','000',.07)
Drawcounties ... 나는 drawcount ** r ** ies ... 사과를 읽었으며, 제대로 읽지 전에 우연히이를 표시했습니다. drawcountries 명령을 사용하여 다른 사람들이 실수를하지 않도록 할 수 있습니다 : / – Ajean