Skip to content

Commit 0fc055d

Browse files
committed
make sure colorbar points are lists of first point and update tests accordingly
1 parent a65c404 commit 0fc055d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

plotly/tests/test_optional/test_figure_factory.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -903,9 +903,9 @@ def test_trisurf_all_args(self):
903903
'mode': 'markers',
904904
'showlegend': False,
905905
'type': 'scatter3d',
906-
'x': -1.0,
907-
'y': -1.0,
908-
'z': 1.0}],
906+
'x': [-1.0],
907+
'y': [-1.0],
908+
'z': [1.0]}],
909909
'layout': {'height': 800,
910910
'scene': {'aspectratio': {'x': 1, 'y': 1, 'z': 1},
911911
'xaxis': {'backgroundcolor': 'rgb(230, 230, 230)',

plotly/tools.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3352,9 +3352,9 @@ def _trisurf(x, y, z, simplices, show_colorbar, edges_color,
33523352
colorscale = FigureFactory._convert_colorscale_to_rgb(colorscale)
33533353

33543354
colorbar = graph_objs.Scatter3d(
3355-
x=x[0],
3356-
y=y[0],
3357-
z=z[0],
3355+
x=x[0:1],
3356+
y=y[0:1],
3357+
z=z[0:1],
33583358
mode='markers',
33593359
marker=dict(
33603360
size=0.1,

0 commit comments

Comments
 (0)