Issue
I got a 3D scatterplot which looks like "tubes", what it in fact should display. Currently every "tube" consist out of 40 markers. What I am trying is, that these 40 markes together built a cylinder, that looks like a tube with the positional arguments from X
, Y
and Z
and the coloration from C
.
X = df['Tube']
Y = df['Window']
C = df['Value']
Z = df['Depth']
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter3D(X,Y,Z, marker='o',s=50, c=C, cmap = 'Reds',edgecolors= "black")
df
Tube Window Value Depth
0 1 1 0.000383 -0.1
1 1 2 0.023253 -0.1
2 1 3 0.022623 -0.1
3 1 4 0.003599 -0.1
4 1 5 0.001281 -0.1
... ... ... ... ...
2155 54 36 0.020977 -1.2
2156 54 37 0.000000 -1.2
2157 54 38 0.007104 -1.2
2158 54 39 0.015233 -1.2
2159 54 40 0.000000 -1.2
Does anybody has any idea how this might be possible?
Solution
It seems to work with mayavi.mlap
.
from mayavi.mlab import *
from mayavi import mlab
from PyQt5 import QtWidgets
X = df['Tube']
Y = df['Window']
C = df['Value']
Z = df['Depth']
plot3d(X, Y, Z, C, tube_radius=0.25, colormap='Reds')
mlab.show()
Answered By - Etiende
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.