KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Ok, so I feel like there should be an easy way to create a 3-dimensional scatter plot using matplotlib. I have a 3D numpy array ( dset ) with 0's where I don't want a point and 1's where I do, basically to plot it now I have to step through three for: loops as such: for i in range(30): for x in range(60): for y in range(60): if dset[i, x, y] == 1: ax.scatter(x, y, -i, zdir='z', c= 'red') Any suggestions on how I could accomplish this more efficiently? Any ideas would be greatly appreciated.
Tags (comma-separated)
Save Edits
Cancel