8
Có cách nào để đặt nhãn đường viền trong ô 3D không? Clabel được rõ ràng không được thực hiện trong không gian 3Dnhãn đường viền matplotlib trong 3D
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
x,y = np.meshgrid(np.linspace(-1,1,10),np.linspace(-1,1,10))
z=-(x**2+y**2)
fig,ax = plt.subplots()
C=ax.contour(x,y,z)
ax.clabel(C)
fig = plt.figure()
ax = fig.add_subplot(111,projection='3d')
C=ax.contour(x,y,z,zdir='z',offset=-2)
ax.clabel(C)