How to plot a single marker on 3D mesh using 3d scatter?

Hello everyone!

I am plotting 3D meshes of brains with their respective activation maps (see screenshot below). Each vertex has a color value which represents the intensity of activation in that area. I want to plot a single red marker on the vertex with the maximum intensity activation. Using the x,y,z coordinates of the vertex with the maximum intensity, I have tried to plot a single marker with 3d scatter but it gives me the error:

Invalid value of type ‘numpy.float64’ received for the ‘x’ property of scatter3d
Received value: -23.87

Is there a way to plot only one marker given its x,y,z coordinates? Am I missing something? I can plot the vertex with the maximum activation by changing its color on the mesh but I would prefer to get a 3d marker instead.

Your help will be highly appreciated!


yes you can do this, try putting your single coordinate into a list, I think the x, y, z arguments have to be iterables.


1 Like

Thank you so much for your answer! You are right. I just was coming to comment on my own post that the x, y, and z data need to be given as a list in the way you pointed out. I highly appreciate your help.

1 Like