diff --git a/holoviews/plotting/bokeh/__init__.py b/holoviews/plotting/bokeh/__init__.py index ee9c4136c3..ae8de911b4 100644 --- a/holoviews/plotting/bokeh/__init__.py +++ b/holoviews/plotting/bokeh/__init__.py @@ -261,11 +261,10 @@ def colormap_generator(palette): options.Ellipse = Options('style', color='black') options.Polygons = Options('style', color=Cycle(), line_color='black', cmap=dflt_cmap) -options.Rectangles = Options('style', cmap=dflt_cmap) -options.Segments = Options('style', cmap=dflt_cmap) # Geometries -options.Rectangles = Options('style', line_color='black') +options.Rectangles = Options('style', color=Cycle(), cmap=dflt_cmap, line_color='black') +options.Segments = Options('style', color='black', cmap=dflt_cmap) # Rasters options.Image = Options('style', cmap=config.default_gridded_cmap) diff --git a/holoviews/plotting/mpl/__init__.py b/holoviews/plotting/mpl/__init__.py index 778b911cb2..18e27d620b 100644 --- a/holoviews/plotting/mpl/__init__.py +++ b/holoviews/plotting/mpl/__init__.py @@ -246,7 +246,8 @@ def grid_selector(grid): whiskerprops=dict(color='k', linewidth=1.5)) # Geometries -options.Rectangles = Options('style', edgecolor='black') +options.Rectangles = Options('style', color=Cycle(), cmap=dflt_cmap, edgecolor='black') +options.Segments = Options('style', color='black', cmap=dflt_cmap) # Rasters options.Image = Options('style', cmap=config.default_gridded_cmap, interpolation='nearest') @@ -284,8 +285,6 @@ def grid_selector(grid): options.Path = Options('style', color=Cycle(), cmap=dflt_cmap) options.Polygons = Options('style', facecolor=Cycle(), edgecolor='black', cmap=dflt_cmap) -options.Rectangles = Options('style', cmap=dflt_cmap) -options.Segments = Options('style', cmap=dflt_cmap) options.Box = Options('style', color='black') options.Bounds = Options('style', color='black') options.Ellipse = Options('style', color='black') diff --git a/holoviews/plotting/plotly/__init__.py b/holoviews/plotting/plotly/__init__.py index 4b4c20c6af..fb7b15954b 100644 --- a/holoviews/plotting/plotly/__init__.py +++ b/holoviews/plotting/plotly/__init__.py @@ -133,7 +133,7 @@ options.Labels = Options('style', color=Cycle()) # Shapes -options.Rectangles = Options('style', line_color=dflt_shape_line_color) +options.Rectangles = Options('style', fillcolor=Cycle(), line_color=dflt_shape_line_color) options.Bounds = Options('style', line_color=dflt_shape_line_color) options.Path = Options('style', line_color=dflt_shape_line_color) options.Segments = Options('style', line_color=dflt_shape_line_color) diff --git a/holoviews/tests/plotting/plotly/test_shapeplots.py b/holoviews/tests/plotting/plotly/test_shapeplots.py index 0e2e97f12f..6683c2e5d4 100644 --- a/holoviews/tests/plotting/plotly/test_shapeplots.py +++ b/holoviews/tests/plotting/plotly/test_shapeplots.py @@ -327,9 +327,11 @@ def test_boxes_simple(self): self.assertEqual(len(shapes), 2) self.assertEqual(shapes[0], {'type': 'rect', 'x0': 0, 'y0': 0, 'x1': 1, 'y1': 1, 'xref': 'x', 'yref': 'y', 'name': '', + 'fillcolor': '#30a2da', 'line': {'color': default_shape_color}}) self.assertEqual(shapes[1], {'type': 'rect', 'x0': 2, 'y0': 2, 'x1': 4, 'y1': 3, 'xref': 'x', 'yref': 'y', 'name': '', + 'fillcolor': '#30a2da', 'line': {'color': default_shape_color}}) self.assertEqual(state['layout']['xaxis']['range'], [0, 4]) self.assertEqual(state['layout']['yaxis']['range'], [0, 3])