Open TTTPOB opened 2 months ago
I encountered a problem today using sq.pl.spatial_scatter, I have to use lowres image in my object, so I see the docstring said - Use ``img_key`` to display the image in the background. https://github.com/scverse/squidpy/blob/e6b5b0ccd2739aa50b55c7628e685a6750249d8f/src/squidpy/pl/_spatial.py#L392 but when I specified img_key in sq.pl.spatial_scatter, I encountered error saying that it is not a valid parameter. So I looked into the source code, and found sq.pl.spatial_scatter calls _spatial_plot https://github.com/scverse/squidpy/blob/e6b5b0ccd2739aa50b55c7628e685a6750249d8f/src/squidpy/pl/_spatial.py#L47
sq.pl.spatial_scatter
lowres
- Use ``img_key`` to display the image in the background.
_spatial_plot
in which the real parameter is named img_res_key https://github.com/scverse/squidpy/blob/e6b5b0ccd2739aa50b55c7628e685a6750249d8f/src/squidpy/pl/_spatial.py#L57 but the docstring of _spatial_plot says img_key as well https://github.com/scverse/squidpy/blob/e6b5b0ccd2739aa50b55c7628e685a6750249d8f/src/squidpy/pl/_spatial.py#L143
img_res_key
img_key
I wanted to submit a pr because this seems a simple fix, just fix the docstring would be good, but when I grep the code base I found
There seem to be a major name inconsistency, and I don't know what is the intended name in opinion of your team, so I gave up and file an issue.
hi @TTTPOB , thank you for pointing it out. Feel free to submit a PR for fixing the docstrings. Thank you!
I encountered a problem today using
sq.pl.spatial_scatter
, I have to uselowres
image in my object, so I see the docstring said- Use ``img_key`` to display the image in the background.
https://github.com/scverse/squidpy/blob/e6b5b0ccd2739aa50b55c7628e685a6750249d8f/src/squidpy/pl/_spatial.py#L392 but when I specified img_key insq.pl.spatial_scatter
, I encountered error saying that it is not a valid parameter. So I looked into the source code, and foundsq.pl.spatial_scatter
calls_spatial_plot
https://github.com/scverse/squidpy/blob/e6b5b0ccd2739aa50b55c7628e685a6750249d8f/src/squidpy/pl/_spatial.py#L47in which the real parameter is named
img_res_key
https://github.com/scverse/squidpy/blob/e6b5b0ccd2739aa50b55c7628e685a6750249d8f/src/squidpy/pl/_spatial.py#L57 but the docstring of_spatial_plot
saysimg_key
as well https://github.com/scverse/squidpy/blob/e6b5b0ccd2739aa50b55c7628e685a6750249d8f/src/squidpy/pl/_spatial.py#L143I wanted to submit a pr because this seems a simple fix, just fix the docstring would be good, but when I grep the code base I found
There seem to be a major name inconsistency, and I don't know what is the intended name in opinion of your team, so I gave up and file an issue.