From f665354b8a0587c6c0cba5e3e0b79d0ee1c57061 Mon Sep 17 00:00:00 2001 From: poplarShift Date: Wed, 27 Feb 2019 15:46:31 -0500 Subject: [PATCH] removed deprecated color/size_index params --- holoviews/element/chart.py | 1 - holoviews/plotting/bokeh/chart.py | 22 --------------------- holoviews/plotting/mpl/chart.py | 33 +------------------------------ 3 files changed, 1 insertion(+), 55 deletions(-) diff --git a/holoviews/element/chart.py b/holoviews/element/chart.py index 54e6eb0c0a..a74a7bfa18 100644 --- a/holoviews/element/chart.py +++ b/holoviews/element/chart.py @@ -69,7 +69,6 @@ class Scatter(Chart): location along the x-axis while the first value dimension represents the location of the point along the y-axis. """ - group = param.String(default='Scatter', constant=True) diff --git a/holoviews/plotting/bokeh/chart.py b/holoviews/plotting/bokeh/chart.py index de17b57004..15bc2551ef 100644 --- a/holoviews/plotting/bokeh/chart.py +++ b/holoviews/plotting/bokeh/chart.py @@ -1061,17 +1061,6 @@ class SegmentPlot(ColorbarPlot): Segments are lines in 2D space where each two each dimensions specify a (x, y) node of the line. """ - # Deprecated parameters - - color_index = param.ClassSelector(default=None, class_=(basestring, int), - allow_None=True, doc=""" - Deprecated in favor of color style mapping, e.g. `color=dim('color')`""") - - size_index = param.ClassSelector(default=None, class_=(basestring, int), - allow_None=True, doc=""" - Deprecated in favor of size style mapping, e.g. `size=dim('size')`""") - - style_opts = line_properties + ['cmap'] _nonvectorized_styles = ['cmap'] @@ -1083,9 +1072,6 @@ def get_data(self, element, ranges, style): x0idx, y0idx, x1idx, y1idx = ( (1, 0, 3, 2) if self.invert_axes else (0, 1, 2, 3) ) - cdim = element.get_dimension(self.color_index) - cdata, cmapping = self._get_color_data(element, ranges, style, - name='line_color') # Compute segments x0s, y0s, x1s, y1s = ( @@ -1095,14 +1081,6 @@ def get_data(self, element, ranges, style): element.dimension_values(y1idx) ) - color = None - if cdim: - color = cdata.get(cdim.name) - data = {'x0': x0s, 'x1': x1s, 'y0': y0s, 'y1': y1s} mapping = dict(x0='x0', x1='x1', y0='y0', y1='y1') - if cdim and color is not None: - data[cdim.name] = color - mapping.update(cmapping) - return (data, mapping, style) diff --git a/holoviews/plotting/mpl/chart.py b/holoviews/plotting/mpl/chart.py index 4e2bfc2b86..883a4cb5e5 100644 --- a/holoviews/plotting/mpl/chart.py +++ b/holoviews/plotting/mpl/chart.py @@ -1262,20 +1262,9 @@ class SideSpikesPlot(AdjoinedPlot, SpikesPlot): class SegmentPlot(ColorbarPlot): """ - Segments are lines in 2D space where each two each dimensions specify a + Segments are lines in 2D space where each two key dimensions specify a (x, y) node of the line. """ - # Deprecated parameters - - color_index = param.ClassSelector(default=None, class_=(basestring, int), - allow_None=True, doc=""" - Deprecated in favor of color style mapping, e.g. `color=dim('color')`""") - - size_index = param.ClassSelector(default=None, class_=(basestring, int), - allow_None=True, doc=""" - Deprecated in favor of size style mapping, e.g. `size=dim('size')`""") - - style_opts = PathPlot.style_opts + ['cmap'] _nonvectorized_styles = ['cmap'] @@ -1300,26 +1289,6 @@ def get_data(self, element, ranges, style): dims = element.dimensions() data = [[(x0, y0), (x1, y1)] for x0, y0, x1, y1 in element.array([x0idx, y0idx, x1idx, y1idx])] - stacked_data = [] - for segment in data: - xs, ys = zip(*segment) - cols = [] - for vs in (xs, ys): - vs = np.array(vs) - cols.append(vs) - stacked_data.append(np.column_stack(cols)) - - - cdim = element.get_dimension(self.color_index) - color = style.get('color', None) - if cdim and ((isinstance(color, basestring) and color in element) or isinstance(color, dim)): - self.param.warning( - "Cannot declare style mapping for 'color' option and " - "declare a color_index; ignoring the color_index.") - cdim = None - if cdim: - style['array'] = element.dimension_values(cdim) - self._norm_kwargs(element, ranges, style, cdim) with abbreviated_exception(): style = self._apply_transforms(element, ranges, style)