다시 올립니다...
input_data = open('C:\\Users\\\\Desktop\\up258_modify.txt').readlines()[1:]
xi = []
yi = []
zi = []
for lineF in input_data:
[ui,zui, obs, pop, exp, d,t,x,y,z] = lineF.split('|')
input_data_x = float(x)
input_data_y = float(y)
input_data_z = float(z)
xi.append(input_data_x)
yi.append(input_data_y)
zi.append(input_data_z)
import pylab
fig = pylab.figure(figsize=(10,17))
from mpl_toolkits.basemap import Basemap
map = Basemap.readshapefile(map,"C:\\Users\\\\Desktop\\dd\\emd",name='emd',linewidth=0.25,drawbounds=True,zorder=None,default_encoding='utf-8')
'''Basemap(width=12000000,height=8000000,llcrnrlon=124.99,llcrnrlat=33.50,urcrnrlon=130. ,urcrnrlat=39.20,
resolution='i',projection='tmerc',lon_0=127.7,lat_0=34.04)'''
from mpl_toolkits.mplot3d import Axes3D
ax = Axes3D(fig)
ax.add_collection3d(map.drawcoastlines(linewidth=0.25))
ax.add_collection3d(map.drawcountries(linewidth=0.35))
ax.scatter(xi,yi,zi, marker='o')
ax.set_zlim(0,140)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Time')
pylab.show()
했더니 오류는 다음과 같습니다..
Traceback (most recent call last):
File "C:/Users/***/PycharmProjects/3dgraph/test.py", line 17, in <module>
map = Basemap.readshapefile(map,"C:\\Users\\***\\Desktop\\dd\\emd",name='emd',linewidth=0.25,drawbounds=True,zorder=None)
File "C:\Python36\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 2172, in readshapefile
x, y = self(lons, lats)
어떻게 해결해야할까요..
TypeError: 'tuple' object is not callable