# Kegel import matplotlib.pyplot as plt import numpy as np from matplotlib import cm, colors from mpl_toolkits.mplot3d import Axes3D phi, theta = np.mgrid [0:2 * np.pi:720j, 0:np.pi / 2:90j] r = np.sqrt (3) x = r * np.cos (phi) * np.sin (theta) y = r * np.sin (phi) * np.sin (theta) z = r * np.sqrt (x**2 + y**2) fig = plt.figure (figsize = (8, 8)) ax = fig.add_subplot (111, projection = "3d") ax.plot_surface (x, y, z, alpha = 0.2, linewidth = 0.1) ax.set_xlim ([-1.8, 1.8]) ax.set_ylim ([-1.8, 1.8]) ax.set_zlim ([ 0.0, 3.2]) ax.set_aspect ("equal") ax.plot_wireframe (x, y, z, color = "lightgreen") plt.show ()