Jun
Jun

Reputation: 5

Graph a cloud of points with plot_trisurf

I'm new to python and have the following problem, I hope you can help me. My program plots 3D cloud of points using plot_trisurf, and I get the next figure:

enter image description here

But I would like it to be of the same color red (no opacity). My data is: (triangles = array of index)

data=[[-5, -2, 0], [-2.0, 0.0, 1.0], [-0.25, 1.5, 1.5], [0.875, 2.75, 1.5], [0.0, -1.0, 0.0], [1.0, 0.5, 1.75], [1.75, 1.75, 2.25], [2.25, -0.5, 0.5], [2.625, 0.75, 2.0], [3.5, -0.25, 0.75]]
triangles=[[4, 0, 1], [1, 4, 5], [5, 1, 2], [2, 5, 6], [6, 2, 3], [7, 4, 5], [5, 7, 8], [8, 5, 6], [9, 7, 8]]

Upvotes: 0

Views: 233

Answers (1)

Ian
Ian

Reputation: 1716

Try setting shade=Falseas argument in the plot. This should hopefully leave all faces with the same color.

Upvotes: 1

Related Questions