Skip to content

Commit 9d8c909

Browse files
committed
More work
1 parent 5528825 commit 9d8c909

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

plotly/tools.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3132,8 +3132,19 @@ def _trisurf(x, y, z, simplices, colormap=None, color_func=None,
31323132
# Make sure we have arrays to speed up plotting
31333133
facecolor = np.asarray(facecolor)
31343134
ii, jj, kk = simplices.T
3135+
3136+
# Adding intensity to Mesh3D Data
3137+
intensity = [j for j in range(len(x))]
3138+
3139+
colorscale_numbered = FigureFactory._make
3140+
31353141
triangles = graph_objs.Mesh3d(x=x, y=y, z=z, facecolor=facecolor,
3136-
i=ii, j=jj, k=kk, name='')
3142+
i=ii, j=jj, k=kk, name='',
3143+
intensity=intensity,
3144+
colorscale=[[0, 'rgb(255, 0, 0)'],
3145+
[0.5, 'rgb(0, 255, 0)'],
3146+
[1, 'rgb(0, 0, 255)']],
3147+
showscale=True)
31373148

31383149
if plot_edges is not True: # the triangle sides are not plotted
31393150
return graph_objs.Data([triangles])
@@ -3435,12 +3446,6 @@ def dist_origin(x, y, z):
34353446
)
34363447
)
34373448

3438-
#data1[0]['colorscale'] = [[0, colormap[0]], [1, colormap[1]]]
3439-
#data1[0]['marker'] = {'colorscale': [[0, 'rgb(255, 0, 0)'], [1, 'rgb(5, 5, 255)']],
3440-
# 'showscale': True}
3441-
data1[0]['colorscale'] = [[0, 'rgb(255, 0, 0)'], [1, 'rgb(5, 5, 255)']]
3442-
data1[0]['showscale'] = True
3443-
34443449
return graph_objs.Figure(data=data1, layout=layout)
34453450

34463451
@staticmethod

0 commit comments

Comments
 (0)