# Kegel import matplotlib.pyplot as plt import numpy as np from matplotlib import cm, colors from mpl_toolkits.mplot3d import Axes3D phi, z = np.mgrid [0:2 * np.pi:720j, 0:4:400j] r = z x = r * np.cos (phi) y = r * np.sin (phi) 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 ([-4.5, 4.5]) ax.set_ylim ([-4.5, 4.5]) ax.set_zlim ([ 0.0, 4.5]) ax.set_aspect ("equal") ax.plot_wireframe (x, y, z, color = "purple") plt.show ()