Skip to content

Commit 29ade20

Browse files
Add files via upload
1 parent 243db8a commit 29ade20

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import matplotlib.pyplot as plt
2+
from mpl_toolkits import mplot3d
3+
4+
fig = plt.figure()
5+
ax = plt.axes(projection='3d')
6+
7+
# Show the plot
8+
plt.show()
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import matplotlib.pyplot as plt
2+
from mpl_toolkits.mplot3d import Axes3D
3+
4+
# Sample data
5+
x = [1, 2, 3, 4, 5]
6+
y = [2, 3, 4, 5, 6]
7+
z = [5, 6, 7, 8, 9]
8+
9+
# Create a 3D scatter plot
10+
fig = plt.figure()
11+
ax = fig.add_subplot(111, projection='3d')
12+
ax.scatter(x, y, z, c='r', marker='o')
13+
14+
# Add labels
15+
ax.set_xlabel('X-axis')
16+
ax.set_ylabel('Y-axis')
17+
ax.set_zlabel('Z-axis')
18+
19+
# Show the plot
20+
plt.show()

0 commit comments

Comments
 (0)