generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Error Message: "Axes3D.plot() missing 2 required positional arguments: 'xs' and 'ys'"
# Create a 3D Torus
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LightSource
R, r = 3, 0.8
polar= np.linspace(0, 2*np.pi, num=20, endpoint=True)
phi= np.linspace(0, 2*np.pi, num=20, endpoint=True)
Polar, Phi= np.meshgrid(polar, phi)
x= (R + r* np.cos(Polar))* np.cos(Phi)
y= (R+ r* np.cos(Polar))* np.sin(Phi)
z= r* np.sin(Polar)
fig= plt.figure(figsize=(6,4))
ax= fig.add_subplot(projection= '3d')
ax.plot_surface(x, y, z, color= 'blue', shade=True, lightsource= LightSource(azdeg=270, altdeg=45) )
ax.set(zlim=(-4,4))
plt.show()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working