Grow each non-empty pixel of a raster over a small neighbourhood so thin marks
stay visible. This is datashader's spread: useful
after datashade(), datashade_lines(), or datashade_segments() when the
output is sparse (single-pixel lines, isolated points). dynspread() chooses
the radius automatically from the image's density; spread() uses a fixed one.
Arguments
- grob
A raster grob (e.g. from
datashade()). Other grob kinds are returned unchanged.- px
Spread radius in pixels (non-negative integer).
0returnsgrobunchanged.- shape
Neighbourhood shape:
"circle"(default, Euclidean radius) or"square"(Chebyshev radius).- how
How overlapping spread pixels combine:
"over"(default) keeps the colour of the most-opaque contributor;"add"accumulates opacity (clamped) so overlaps darken.
Value
A raster grob with the spread applied.
