Skip to content
Permalink
Browse files

Added unit tests for legend muting

  • Loading branch information...
philippjfr committed Jun 26, 2018
1 parent 0ed155d commit 787a97d4bbda645c923c04cb5bd42212a3b44df4
Showing with 14 additions and 1 deletion.
  1. +14 −1 tests/plotting/bokeh/testelementplot.py
@@ -2,7 +2,7 @@

import numpy as np

from holoviews.core import Dimension, DynamicMap
from holoviews.core import Dimension, DynamicMap, NdOverlay
from holoviews.element import Curve, Image, Scatter, Labels
from holoviews.streams import Stream
from holoviews.plotting.util import process_cmap
@@ -193,3 +193,16 @@ def test_overlay_gridstyle_applies(self):
plot = bokeh_renderer.get_plot(overlay)
self.assertEqual(plot.state.xgrid[0].grid_line_color, 'blue')
self.assertEqual(plot.state.xgrid[0].grid_line_width, 2)

def test_ndoverlay_legend_muted(self):
overlay = NdOverlay({i: Curve(np.random.randn(10).cumsum()) for i in range(5)}).options(legend_muted=True)
plot = bokeh_renderer.get_plot(overlay)
for sp in plot.subplots.values():
self.assertTrue(sp.handles['glyph_renderer'].muted)

def test_overlay_legend_muted(self):
overlay = (Curve(np.random.randn(10).cumsum(), label='A') *
Curve(np.random.randn(10).cumsum(), label='B')).options(legend_muted=True)
plot = bokeh_renderer.get_plot(overlay)
for sp in plot.subplots.values():
self.assertTrue(sp.handles['glyph_renderer'].muted)

0 comments on commit 787a97d

Please sign in to comment.
You can’t perform that action at this time.