scanpy icon indicating copy to clipboard operation
scanpy copied to clipboard

Description of "legend_loc" option in scanpy.pl.embedding is inaccurate or not implemented yet.

Open adkinsrs opened this issue 2 years ago • 0 comments

  • [X] I have checked that this issue has not already been reported.
  • [X] I have confirmed this bug exists on the latest version of scanpy.
  • [X] (optional) I have confirmed this bug exists on the master branch of scanpy.

Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

In the documentation at https://scanpy.readthedocs.io/en/stable/generated/scanpy.pl.embedding.html#scanpy.pl.embedding, the description of the "legend_loc" param is as follows:

legend_loc : str (default: 'right margin') Location of legend, either 'on data', 'right margin' or a valid keyword for the loc parameter of Legend.

The part in bold does not seem to be implemented, as the "legend_loc" only has if/elif conditions for it is "right margin" or "on data"... nothing for the matplotlib "loc" keywords. I am not sure if it is best to implement this to match the description, or change the description to omit the part in bold.

Minimal code sample (that we can copy&paste without having any data)

https://github.com/scverse/scanpy/blob/2e98705347ea484c36caa9ba10de1987b09081bf/scanpy/plotting/_tools/scatterplots.py#L55-L461

https://github.com/scverse/scanpy/blob/2e98705347ea484c36caa9ba10de1987b09081bf/scanpy/plotting/_tools/scatterplots.py#L1099-L1109

Versions

Not applicable

adkinsrs avatar Apr 08 '22 17:04 adkinsrs