@@ -3132,8 +3132,19 @@ def _trisurf(x, y, z, simplices, colormap=None, color_func=None,
3132
3132
# Make sure we have arrays to speed up plotting
3133
3133
facecolor = np .asarray (facecolor )
3134
3134
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
+
3135
3141
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 )
3137
3148
3138
3149
if plot_edges is not True : # the triangle sides are not plotted
3139
3150
return graph_objs .Data ([triangles ])
@@ -3435,12 +3446,6 @@ def dist_origin(x, y, z):
3435
3446
)
3436
3447
)
3437
3448
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
-
3444
3449
return graph_objs .Figure (data = data1 , layout = layout )
3445
3450
3446
3451
@staticmethod
0 commit comments