matplotlib 3d scatter code example
Example 1: 3D plot matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
Example 2: matplotlib scatter
# Import packages
import matplotlib.pyplot as plt
%matplotlib inline
# Create the plot
fig, ax = plt.subplots()
# Plot with scatter()
ax.scatter(x, y)
# Set x and y axes labels, legend, and title
ax.set_title("Title")
ax.set_xlabel("X_Label")
ax.set_ylabel("Y_Label")