Feature request: remove need for intermediate pl calls when chaining renderers
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- data-visualization
Research direction
Start by inspecting the pl accessor and the render_* methods, especially how they currently return SpatialData and support chained calls. Compare the existing sdata.pl.render_images().pl.render_shapes().pl.show() example with the proposed chaining behavior, and resolve how pl and pp operations should interact. Done means a decided API design and working renderer chaining without intermediate pl calls.
Written by the indexing model from the issue text.
Description
Description of feature
Thanks for the super nice work, @timtreis and @sagar87 ! I think it would be nice if we didn't have to add intermediate calls to pl when chaining renderers. That is, I think it would be nice if instead of this:
sdata.pl.render_images().pl.render_shapes().pl.show()
We could do this:
sdata.pl.render_images().render_shapes().show()
This perhaps could be possible if the render_*() methods returned the plot accessor instead of the SpatialData object. I suppose this means that one couldn't do a pp operation after a pl operation, but maybe that suggests the pl and pp operations should be on the same level of the hierarchy or one should do their preprocessing first, then their plotting. I'm not sure what's best here, but it might be good to experiment with this once all of the p0 functionality is finished.
- Dominant language
- Python
- Stars
- 86
- Forks
- 21
- Avg merge
- 14h 50m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scverse/spatialdata-plot
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
scverse/spatialdata-plot#775 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
scverse/spatialdata-plot#777 ·
-
`pl.show()` leading to `ValueError` due to mismatch between number of axes and number of panels Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
scverse/spatialdata-plot#749 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
scverse/spatialdata-plot#747 ·
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
scverse/spatialdata-plot#677 ·
All issues in scverse/spatialdata-plot
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100