example codes
example codes
pyplot as plt
x = [1,2,3,4]
y = [1,2,3,4]
plt.plot(x, y)
plt.show()
# Create a 3D plot
fig = plt.figure()
ax = fig.add_subplot(111, projection="3d") # Create 3D axes
x = [1, 2, 3, 4, 5]
y = [3, 5, 2, 1, 4]
z = [5, 2, 1, 4, 3]
plt.show()
mport numpy as np
import matplotlib.pyplot as plt