@@ -116,7 +116,7 @@ def __init__(self, view, viewer_state, layer_state=None, layer=None):
116116
117117 lines_gl_cls = LinesGL
118118 self .line_mark_gl = lines_gl_cls (scales = self .view .scales , x = [0. ], y = [0. ])
119- self .line_mark_gl .colors = [color2hex (self .state .color )]
119+ self .line_mark_gl .color = [color2hex (self .state .color )]
120120 self .line_mark_gl .opacities = [self .state .alpha ]
121121
122122 # duplicate lines using base bqplot.Lines for linestyle default visible=False
@@ -147,7 +147,7 @@ def __init__(self, view, viewer_state, layer_state=None, layer=None):
147147
148148 vector_lines_cls = bqplot .Lines
149149 self .vector_lines = vector_lines_cls (scales = self .view .scales , x = [0. ], y = [0. ])
150- self .vector_lines .colors = [color2hex (self .state .color )]
150+ self .vector_lines .color = [color2hex (self .state .color )]
151151 self .vector_lines .visible = False
152152
153153 # Density map
@@ -257,6 +257,7 @@ def _update_data(self):
257257 self .vector_mark .default_size = int (size * scale * 4 )
258258 self .vector_mark .size = length
259259 self .vector_mark .rotation = angle
260+ self .vector_mark .color = [color2hex (self .state .color )]
260261
261262 vector_line_coords = self ._build_line_vector_points (x , y , vx , vy )
262263 x_vector_coords = vector_line_coords [:, 0 ]
@@ -336,7 +337,7 @@ def _update_visual_attributes(self, changed, force=False):
336337
337338 if self .state .line_visible :
338339 if force or "color" in changed :
339- self .line_mark_gl .colors = [color2hex (self .state .color )]
340+ self .line_mark_gl .color = [color2hex (self .state .color )]
340341 self .line_mark .colors = [color2hex (self .state .color )]
341342 if force or "linewidth" in changed :
342343 self .line_mark_gl .stroke_width = self .state .linewidth
@@ -363,6 +364,8 @@ def _update_visual_attributes(self, changed, force=False):
363364 if force or "color" in changed or "cmap_mode" in changed :
364365 self .vector_mark .color = None
365366 self .vector_mark .colors = [color2hex (self .state .color )]
367+ self .vector_lines .color = None
368+ self .vector_lines .colors = [color2hex (self .state .color )]
366369 elif force or any (prop in changed for prop in CMAP_PROPERTIES ):
367370 self .vector_mark .color = ensure_numerical (
368371 self .layer [self .state .cmap_att ].ravel (),
0 commit comments