Commit a276bd8
committed
Route plain density through the continuous shade path
For ``color=None``, the dispatch in ``_render_points`` was sending the
aggregate to ``_ds_shade_categorical``, which uses ``color_vector[0]``
as a single hex color and only modulates alpha across counts. That
collapses any sequential colormap (``viridis`` and friends) to a flat
hue and makes a "density" plot look like a uniform smudge with low
opacity.
Plain density now routes through ``_ds_shade_continuous`` so the
configured cmap is used as a real intensity gradient over the count
aggregate. ``density_how`` ("linear" / "log" / "cbrt" / "eq_hist")
finally produces visibly different results.
The categorical density branch is unchanged: per-category color keys
still pass through ``_ds_shade_categorical`` and modulate alpha per
gene, which is the correct behaviour for "where does each category
concentrate".1 parent 33c84e7 commit a276bd8
4 files changed
Lines changed: 5 additions & 1 deletion
File tree
- src/spatialdata_plot/pl
- tests/_images
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1091 | 1091 | | |
1092 | 1092 | | |
1093 | 1093 | | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1094 | 1098 | | |
1095 | 1099 | | |
1096 | | - | |
| 1100 | + | |
1097 | 1101 | | |
1098 | 1102 | | |
1099 | 1103 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments