The documentation for legend_loc in spatial_scatter refers to matplotlib.legend.Legend which is wrong I think. The legend_loc variable is passed to the scanpy function _add_categorical_legend (code), so it seems like the only valid options for legend_loc are ["right margin", "on data"] which should be specified in the documentation.
that is correct! Thank you @schae211 for this, would really appreciate if you could submit a PR clarifying this line in the docs, would be super useful!
https://github.com/scverse/squidpy/blob/16a9885976e24778664c81c05a9b592b2bd4a237/src/squidpy/_docs.py#L222-L223
The documentation for
legend_loc
inspatial_scatter
refers tomatplotlib.legend.Legend
which is wrong I think. Thelegend_loc
variable is passed to the scanpy function_add_categorical_legend
(code), so it seems like the only valid options forlegend_loc
are ["right margin", "on data"] which should be specified in the documentation.