@@ -227,8 +227,15 @@ def render_shapes(
227
227
Name of the table containing the color(s) columns. If one name is given than the table is used for each
228
228
spatial element to be plotted if the table annotates it. If you want to use different tables for particular
229
229
elements, as specified under element.
230
+
230
231
**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
+
232
239
233
240
Notes
234
241
-----
@@ -264,13 +271,13 @@ def render_shapes(
264
271
scale = scale ,
265
272
table_name = table_name ,
266
273
method = method ,
274
+ ds_reduction = kwargs .get ("datashader_reduction" , None ),
267
275
)
268
276
269
277
sdata = self ._copy ()
270
278
sdata = _verify_plotting_tree (sdata )
271
279
n_steps = len (sdata .plotting_tree .keys ())
272
280
outline_params = _set_outline (outline_alpha > 0 , outline_width , outline_color )
273
-
274
281
for element , param_values in params_dict .items ():
275
282
cmap_params = _prepare_cmap_norm (
276
283
cmap = cmap ,
@@ -291,7 +298,8 @@ def render_shapes(
291
298
transfunc = kwargs .get ("transfunc" , None ),
292
299
table_name = param_values ["table_name" ],
293
300
zorder = n_steps ,
294
- method = method ,
301
+ method = param_values ["method" ],
302
+ ds_reduction = param_values ["ds_reduction" ],
295
303
)
296
304
n_steps += 1
297
305
@@ -361,8 +369,14 @@ def render_points(
361
369
Name of the table containing the color(s) columns. If one name is given than the table is used for each
362
370
spatial element to be plotted if the table annotates it. If you want to use different tables for particular
363
371
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'.
366
380
367
381
Returns
368
382
-------
@@ -388,6 +402,7 @@ def render_points(
388
402
norm = norm ,
389
403
size = size ,
390
404
table_name = table_name ,
405
+ ds_reduction = kwargs .get ("datashader_reduction" , None ),
391
406
)
392
407
393
408
if method is not None :
@@ -419,6 +434,7 @@ def render_points(
419
434
table_name = param_values ["table_name" ],
420
435
zorder = n_steps ,
421
436
method = method ,
437
+ ds_reduction = param_values ["ds_reduction" ],
422
438
)
423
439
n_steps += 1
424
440
0 commit comments