October 2018
Beginner to intermediate
676 pages
18h 30m
English
Here are the steps to plot 3D line graphs:
x = np.linspace(-5, 5, 25)y = np.linspace(-5, 5, 25)z = x**2 + y**2z1 = 1 - (x**2 + y**2)
def plot_graph(axes, xlabel, ylabel, zlabel, title, elevation, rotation): axes.plot3D(x, y, z, label='concave') axes.plot(x, y, z1, label='convex') axes.view_init(elev=elevation, azim=rotation) axes.set_xlabel(xlabel) axes.set_ylabel(ylabel) axes.set_zlabel(zlabel) axes.set_title(title) axes.legend(loc='best')
fig = plt.figure(figsize=(15,9))ax1 = fig.add_subplot(231, projection='3d')
Read now
Unlock full access