@@ -227,8 +227,15 @@ def render_shapes(
227227 Name of the table containing the color(s) columns. If one name is given than the table is used for each
228228 spatial element to be plotted if the table annotates it. If you want to use different tables for particular
229229 elements, as specified under element.
230+
230231 **kwargs : Any
231- Additional arguments to be passed to cmap and norm.
232+ Additional arguments for customization. This can include:
233+
234+ datashader_reduction : Literal[
235+ "sum", "mean", "any", "count", "std", "var", "max", "min"
236+ ], default: "sum"
237+ Reduction method for datashader when coloring by continuous values. Defaults to 'sum'.
238+
232239
233240 Notes
234241 -----
@@ -264,13 +271,13 @@ def render_shapes(
264271 scale = scale ,
265272 table_name = table_name ,
266273 method = method ,
274+ ds_reduction = kwargs .get ("datashader_reduction" , None ),
267275 )
268276
269277 sdata = self ._copy ()
270278 sdata = _verify_plotting_tree (sdata )
271279 n_steps = len (sdata .plotting_tree .keys ())
272280 outline_params = _set_outline (outline_alpha > 0 , outline_width , outline_color )
273-
274281 for element , param_values in params_dict .items ():
275282 cmap_params = _prepare_cmap_norm (
276283 cmap = cmap ,
@@ -291,7 +298,8 @@ def render_shapes(
291298 transfunc = kwargs .get ("transfunc" , None ),
292299 table_name = param_values ["table_name" ],
293300 zorder = n_steps ,
294- method = method ,
301+ method = param_values ["method" ],
302+ ds_reduction = param_values ["ds_reduction" ],
295303 )
296304 n_steps += 1
297305
@@ -361,8 +369,14 @@ def render_points(
361369 Name of the table containing the color(s) columns. If one name is given than the table is used for each
362370 spatial element to be plotted if the table annotates it. If you want to use different tables for particular
363371 elements, as specified under element.
364- kwargs
365- Additional arguments to be passed to cmap and norm.
372+
373+ **kwargs : Any
374+ Additional arguments for customization. This can include:
375+
376+ datashader_reduction : Literal[
377+ "sum", "mean", "any", "count", "std", "var", "max", "min"
378+ ], default: "sum"
379+ Reduction method for datashader when coloring by continuous values. Defaults to 'sum'.
366380
367381 Returns
368382 -------
@@ -388,6 +402,7 @@ def render_points(
388402 norm = norm ,
389403 size = size ,
390404 table_name = table_name ,
405+ ds_reduction = kwargs .get ("datashader_reduction" , None ),
391406 )
392407
393408 if method is not None :
@@ -419,6 +434,7 @@ def render_points(
419434 table_name = param_values ["table_name" ],
420435 zorder = n_steps ,
421436 method = method ,
437+ ds_reduction = param_values ["ds_reduction" ],
422438 )
423439 n_steps += 1
424440
0 commit comments