Skip to content

Commit d5981d0

Browse files
committed
feat(as_points): lower datashader auto-threshold to 50k centroids
Datashader pays off for as_points from ~50k cells (~1.66x faster than the matplotlib scatter backend, rising to ~1.8x at 1M), so switch over there instead of 500k. Users can still force either backend via method=.
1 parent 6dae318 commit d5981d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/spatialdata_plot/pl/render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ def _scatter_points(
11141114

11151115
# Above this many centroids matplotlib's per-glyph draw (~18 µs/dot) dominates, so auto-switch to
11161116
# datashader. Conservative because datashader changes the look (density raster); only used when method=None.
1117-
AS_POINTS_DS_AUTO = 500_000
1117+
AS_POINTS_DS_AUTO = 50_000
11181118

11191119

11201120
def _resolve_as_points_method(

0 commit comments

Comments
 (0)