2808 explained code solutions for 75 technologies


python-matplotlib3D Scatter chart example


import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(projection='3d')

ax.scatter(1, 1, 1)
ax.scatter(2, 2, 1)
ax.scatter(2, 3, 0)

plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.add_subplot

create sub chart

projection='3d'

set 3d mode for this chart

.scatter(

plots a point chart

.show()

render chart in a separate window


3D Scatter chart example, python matplotlib

Usage example

import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(projection='3d')

ax.scatter(1, 1, 1)
ax.scatter(2, 2, 1)
ax.scatter(2, 3, 0)

plt.show()