正如标题所示,我正在尝试在 matplotlib.mplot3d 线图的 z=0 表面上绘制底图。我知道 Axes3D 对象能够在 z=0 表面上绘图(通过 Axes3D.plot、Axes3D.scatter 等),但我不知道如何使用 Basemap 对象进行绘图。希望下面的代码足够清楚地显示我需要什么。任何想法将不胜感激!
import matplotlib.pyplot as pp
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.basemap import Basemap
# make sample data for 3D lineplot
z = np.linspace(-2, 2, 100)
r = z**2 + 1
x = r * np.sin(theta)
y = r * np.cos(theta)
# make the 3D line plot
FIG = ct.pp.figure()
AX = Axes3D(FIG)
AX.plot(x, y, z, '-b')
# make the 2D basemap
### NEEDS TO SOMEHOW BE AT z=0 IN FIG
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')