To plot a 3D graph in Python using Matplotlib, you first need to import the necessary libraries:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
Next, create a figure and an axis object:
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
Now, you can plot your 3D graph by specifying the x, y, and z coordinates:
x = [1, 2, 3, 4, 5]
y = [5, 4, 3, 2, 1]
z = [1, 2, 3, 4, 5]
ax.