Skip to content

Commit 3665405

Browse files
authored
chore!: Remove deprecated parameters (#6819)
1 parent 6b75e0b commit 3665405

46 files changed

Lines changed: 186 additions & 1519 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/gallery/demos/bokeh/choropleth_data_link.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"(choropleth + table).opts(\n",
7676
" opts.Table(height=428),\n",
7777
" opts.Polygons(width=500, height=500, tools=['hover', 'tap'], xaxis=None,\n",
78-
" yaxis=None, color_index='Unemployment'))"
78+
" yaxis=None, color='Unemployment'))"
7979
]
8080
}
8181
],

examples/gallery/demos/bokeh/dot_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"source": [
5252
"(heatmap + spikes * scatter).opts(\n",
5353
" opts.Scatter(size=15, fill_color=\"orange\", line_color=\"green\"),\n",
54-
" opts.Spikes(color='green', line_width=4, labelled=[], invert_axes=True, color_index=None),\n",
54+
" opts.Spikes(color='green', line_width=4, labelled=[], invert_axes=True),\n",
5555
" opts.Layout(shared_axes=False))"
5656
]
5757
}

examples/gallery/demos/bokeh/network_graph.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"fb_graph = fb_graph.redim.range(x=(-0.05, 1.05),\n",
6262
" y=(-0.05, 1.05)\n",
6363
" )\n",
64-
"fb_graph.opts(color_index='circle', width=800, height=800, show_frame=False,\n",
64+
"fb_graph.opts(node_color='circle', width=800, height=800, show_frame=False,\n",
6565
" xaxis=None, yaxis=None,node_size=10, edge_line_width=1, cmap=colors)"
6666
]
6767
}

examples/gallery/demos/bokeh/square_limit.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,5 @@
145145
}
146146
},
147147
"nbformat": 4,
148-
"nbformat_minor": 2
148+
"nbformat_minor": 4
149149
}

examples/gallery/demos/bokeh/texas_choropleth_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"choropleth.opts(\n",
6363
" opts.Polygons(logz=True, tools=['hover'], xaxis=None, yaxis=None,\n",
6464
" show_grid=False, show_frame=False, width=500, height=500,\n",
65-
" color_index='Unemployment', colorbar=True, toolbar='above', line_color='white'))"
65+
" color=\"Unemployment\", colorbar=True, toolbar='above', line_color='white'))"
6666
]
6767
}
6868
],

examples/reference/elements/bokeh/Graph.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"source": [
121121
"#### Additional features\n",
122122
"\n",
123-
"Next we will extend this example by supplying explicit edges, node information and edge weights. By constructing the ``Nodes`` explicitly we can declare an additional value dimensions, which are revealed when hovering and/or can be mapped to the color by specifying the ``color_index``. We can also associate additional information with each edge by supplying a value dimension to the ``Graph`` itself, which we can map to a color using the ``edge_color_index``."
123+
"Next we will extend this example by supplying explicit edges, node information and edge weights. By constructing the ``Nodes`` explicitly we can declare an additional value dimensions, which are revealed when hovering and/or can be mapped to the color using the ``node_color`` option. We can also associate additional information with each edge by supplying a value dimension to the ``Graph`` itself, which we can map to a color using the ``edge_color`` option."
124124
]
125125
},
126126
{

examples/reference/elements/matplotlib/Labels.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"cell_type": "markdown",
5757
"metadata": {},
5858
"source": [
59-
"If the value dimension of the data is not already of string type it will be formatted using the applicable entry in ``Dimension.type_formatters`` or an explicit ``value_format`` defined on the Dimension. Additionally the ``color_index`` option allows us to colormap the text by a dimension.\n",
59+
"If the value dimension of the data is not already of string type it will be formatted using the applicable entry in ``Dimension.type_formatters`` or an explicit ``value_format`` defined on the Dimension. Additionally the ``color`` option allows us to colormap the text by a dimension.\n",
6060
"\n",
6161
"Here we will create a 2D array of values, define a Dimension with a formatter and then colormap the text:"
6262
]

holoviews/annotators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def _process_element(self, element=None):
478478

479479
# Add options to element
480480
tools = [tool() for tool in self._tools]
481-
opts = dict(tools=tools, color_index=None, **self.default_opts)
481+
opts = dict(tools=tools, **self.default_opts)
482482
opts.update(self._extra_opts)
483483
return element.options(
484484
**{k: v for k, v in opts.items() if k not in element.opts.get("plot").kwargs}

holoviews/operation/datashader.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
NdOverlay,
2525
Operation,
2626
Overlay,
27-
Store,
2827
)
2928
from ..core.data import (
3029
DaskInterface,
@@ -2341,11 +2340,7 @@ def _validate(cls, raster):
23412340

23422341
@classmethod
23432342
def _element(cls, raster, df):
2344-
polygons = Polygons(df, kdims=raster.kdims, vdims=cls._vdims(raster, df))
2345-
if Store.loaded_backends() != []:
2346-
return polygons.opts(color_index=None)
2347-
else:
2348-
return polygons
2343+
return Polygons(df, kdims=raster.kdims, vdims=cls._vdims(raster, df))
23492344

23502345
@classmethod
23512346
def _sort_by_distance(cls, raster, df, x, y):

holoviews/plotting/bokeh/annotation.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,6 @@ class LabelsPlot(ColorbarPlot, AnnotationPlot):
180180
doc="Amount of offset to apply to labels along x-axis.",
181181
)
182182

183-
# Deprecated options
184-
185-
color_index = param.ClassSelector(
186-
default=None,
187-
class_=(str, int),
188-
allow_None=True,
189-
doc="Deprecated in favor of color style mapping, e.g. `color=dim('color')`",
190-
)
191-
192183
selection_display = BokehOverlaySelectionDisplay()
193184

194185
style_opts = [
@@ -225,19 +216,6 @@ def get_data(self, element, ranges, style):
225216
self._categorize_data(data, (xdim, ydim), element.dimensions())
226217

227218
self._get_hover_data(data, element)
228-
229-
cdim = element.get_dimension(self.color_index)
230-
if cdim is None:
231-
return data, mapping, style
232-
233-
cdata, cmapping = self._get_color_data(element, ranges, style, name="text_color")
234-
if dims[2] is cdim and cdata:
235-
# If color dim is same as text dim, rename color column
236-
data["text_color"] = cdata[tdim]
237-
mapping["text_color"] = dict(cmapping["text_color"], field="text_color")
238-
else:
239-
data.update(cdata)
240-
mapping.update(cmapping)
241219
return data, mapping, style
242220

243221

0 commit comments

Comments
 (0)