matplotlib three dimensional plot

38

fig = plt.figure()
ax = plt.axes(projection='3d')
def f(x, y):
    return np.sin(np.sqrt(x ** 2 + y ** 2))

x = np.linspace(-6, 6, 30)
y = np.linspace(-6, 6, 30)

X, Y = np.meshgrid(x, y)
Z = f(X, Y)
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

Comments

Submit
0 Comments