Reputation: 416
I tried to run these codes:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.basemap import Basemap
map = Basemap()
fig = plt.figure()
ax = Axes3D(fig)
'''
ax.azim = 270
ax.elev = 90
ax.dist = 5
'''
ax.add_collection3d(map.drawcoastlines(linewidth=0.25))
ax.add_collection3d(map.drawcountries(linewidth=0.35))
plt.show()
NotImplementedError: Axes3D currently only supports the aspect argument 'auto'. You passed in 'equal'.
AttributeError: 'LineCollection' object has no attribute 'do_3d_projection'
Any suggestions in resolving this? Is this because of my environment; my packages versions causing issues?
Upvotes: 0
Views: 2065
Reputation: 11
I faced the same issue and fixed it by adding fix_aspect=Flase
in Basemap
as below.
map = Basemap(fix_aspect=False)
Upvotes: 1