scverse / scverse/spatialdata-plot

Feature request: remove need for intermediate pl calls when chaining renderers

未关闭
#54 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

enhancement priority: low
主要语言
Python
星标
86
派生
21
平均合并
14 小时 50 分钟
30 天内合并 PR
3

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查 pl accessor 和 render_* 方法,特别是它们当前如何返回 SpatialData 以及支持链式调用。将现有示例 sdata.pl.render_images().pl.render_shapes().pl.show() 与提议的链式行为进行比较,并确定 pl 和 pp 操作应如何交互。完成的标准是确定 API 设计,并实现无需中间 pl 调用的 renderer 链式调用。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
data-visualization
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。