Python Forum
3D Plotting in Matplotlib for Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D Plotting in Matplotlib for Python
#2
As it could be seen from the official docs, c parameter in the scatter function could be a vector, consisting of
corresponding colors to each point.

# changes in your code
colored_inds = [10, 12, 15]  # points #10, 12 and 15 will be blue.
colors = ['r' if j not in colored_inds else 'b' for j in range(len(x))]
ax.scatter(x, y, z, c=colors, marker='o')
Reply


Messages In This Thread
3D Plotting in Matplotlib for Python - by pabloanm - Apr-20-2019, 07:37 PM
RE: 3D Plotting in Matplotlib for Python - by scidam - Apr-21-2019, 06:20 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020