As the name implies, I'm trying to build a Basemap map on the surface z = 0 of the line of the matplotlib.mplot3d line. I know that an Axes3D object can build on a surface z = 0 (via Axes3D.plot, Axes3D.scatter, etc.), but I can’t figure out how to do this with a Basemap object. Hope the code below shows what I need quite clearly. Any ideas would be greatly appreciated!
import matplotlib.pyplot as pp
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.basemap import Basemap
z = np.linspace(-2, 2, 100)
r = z**2 + 1
x = r * np.sin(theta)
y = r * np.cos(theta)
FIG = ct.pp.figure()
AX = Axes3D(FIG)
AX.plot(x, y, z, '-b')
M = ct.Basemap(projection='stere', width=3700e3, height=2440e3,
lon_0=-5.0, lat_0=71.0, lat_ts=71.0,
area_thresh=100, resolution='c')
PATCHES = M.fillcontinents(lake_color='#888888', color='#282828')
source
share