-
Notifications
You must be signed in to change notification settings - Fork 18
Bug: transfunc has inconsistent/broken behavior across render methods #582
Copy link
Copy link
Open
Description
Description
transfunc (passed via **kwargs) has inconsistent and partially broken behavior across the three element rendering methods:
render_points — correct
- Applied when
color_source_vector is None(continuous data) - Receives raw numeric values before colormap mapping
- Use case:
np.log1p,np.sqrtetc. on expression values
render_shapes — inverted condition (bug)
- Applied when
values_are_categoricalisTrue(render.py~line 396) - At that point
color_vectoris apd.Categoricalof hex color strings like"#FF0000FF" - Calling a numeric transform on hex strings is nonsensical and will either crash or silently corrupt the color vector
- The condition should be flipped to match points: apply only for continuous data
render_labels — dead code
- Extracted from kwargs and stored in
LabelsRenderParams.transfunc _render_labels()never readsrender_params.transfunc- Parameter is silently accepted but has zero effect
Expected behavior
All three methods should match render_points: apply transfunc to raw numeric values when coloring by continuous data, and ignore it for categorical data.
Found during
Docstring & parameter audit for #463.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels