Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %matplotlib inline
- import numpy as np
- import cv2
- import matplotlib.pyplot as plt
- from mpl_toolkits.mplot3d import Axes3D
- from PIL import ImageTk,Image
- from tkinter import *
- fig = plt.figure()
- ax = fig.add_subplot(111, projection='3d')
- # Make data
- u = np.linspace(0, 2 * np.pi, 100)
- v = np.linspace(0, np.pi, 100)
- x = 20 * np.outer(np.cos(u), np.sin(v))
- y = 20 * np.outer(np.sin(u), np.sin(v))
- z = 20 * np.outer(np.ones(np.size(u)), np.cos(v))
- # Plot the surface
- ax.plot_surface(x, y, z, alpha=.5)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement