import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
"""
Create matrix of ones
"""
a = np.ones((5,10))
# end
# plot a 3d sin wave
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
"""
Create matrix of ones
"""
a = np.ones((5,10))
# end
# plot a 3d sin wave
x = np.linspace(0, 2 * np.pi, 100)
y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)
z = np.sin(x) + np.cos(y)
fig = plt.figure()
ax = plt.axes(projection='3d')
ax.plot_surface(x, y, z, cmap='viridis')
plt.savefig('/tmp/test.png')
Go to Google Form