Skip to content

Documentation for pl.scatter #458

Closed

Description

@bebatut

Hi,

Some of the parameters documented online for pl.scatter are not accepted by the method: ncols, wspace, hspace. And some are not documented: right_margin, left_margin.

The difference seems to come from the parameters described in {scatter_bulk} and used for pl.scatter documentation.

What should be fixed scatter_bulk or inputs for pl.scatter?

Bérénice

Activity

  1. fidelram commented on Feb 4, 2019

    @fidelram
    Collaborator
  2. bebatut commented on Feb 4, 2019

    @bebatut
    ContributorAuthor

    right_margin and left_margin are still listed as parameters for pl.scatter:

    https://github.com/theislab/scanpy/blob/c15a5e8763097082c82cd8ef6fee697954c487dc/scanpy/plotting/_anndata.py#L49

    And ncols, wspace and hspace are not accepted (with the current version on conda) 😟

  3. fidelram commented on Feb 4, 2019

    @fidelram
    Collaborator
  4. falexwolf commented on Feb 5, 2019

    @falexwolf
    Member

    We're not maintaining the bioconda version, but it looks as if it was up to date: https://bioconda.github.io/recipes/scanpy/README.html

    How is it working, anyways? Does somebody know? Does it automatically pull from PyPI?

  5. flying-sheep commented on Feb 5, 2019

    @flying-sheep
    Member

    We have the badge. I think we should remove that if we’re not actually recommending installation that way. If there’s a “[On ]bioconda” badge to put next to the PyPI badge, I’d prefer that.

    /edit: The badges are custom, we can control the text. I replaced it to match the PyPI badge, except that we can’t get a version, so I put a cute snake:

  6. flying-sheep commented on Feb 5, 2019

    @flying-sheep
    Member

    How is it working, anyways? Does somebody know? Does it automatically pull from PyPI?

    yes: bioconda/bioconda-recipes#12958

    This pull request was automatically generated by bioconda-utils.

  7. falexwolf commented on Feb 5, 2019

    @falexwolf
    Member

    Thanks! Makes sense! (Both the badge and the automatic update from PyPI).

  8. fbnrst commented on Mar 22, 2019

    @fbnrst
    Contributor

    I also just realised that pl.scatter does not take ncols as an argument. I am also using scanpy v1.4 from bioconda. The online documentation also does not mention ncols as an argument:
    scanpy.pl.scatter(adata, x=None, y=None, color=None, use_raw=None, layers='X', sort_order=True, alpha=None, basis=None, groups=None, components=None, projection='2d', legend_loc='right margin', legend_fontsize=None, legend_fontweight=None, color_map=None, palette=None, frameon=None, right_margin=None, left_margin=None, size=None, title=None, show=None, save=None, ax=None) (copy-paste from https://icb-scanpy.readthedocs-hosted.com/en/latest/api/scanpy.pl.scatter.html), but it does mention ncols below in the description.

  9. falexwolf commented on Mar 24, 2019

    @falexwolf
    Member

    pl.scatter is, unfortunately, not in the best shape anymore. Since Fidel rewrote a large part of the plotting API, it's not used by any of the frequently used embeddings scatters anymore and would need to be simplified a lot, before actually adding new functionality (like ncols).

    Would you mind correcting the docs? What are you using pl.scatter for?

  10. fbnrst commented on Mar 24, 2019

    @fbnrst
    Contributor

    Sure, I can have a look at the docs. I've been using it because of the layers argument since pl.umap does not seem to have it.

  11. fidelram commented on Mar 25, 2019

    @fidelram
    Collaborator

    @fabianrost84 The 'layers' were not added to anndata until recently and had not been implemented in all functions. However, adding this functionality to the different scatter plot functions is straightforward.

    Let me prepare a quick PR.

  12. fbnrst commented on Mar 25, 2019

    @fbnrst
    Contributor

    As @bebatut pointed out, pl.scatter uses doc_scatter_bulk for the documentation. It does not seem to make sense to remove ncols from doc_scatter_bulk as it is used for pl.umap and so on.
    How should the docs for pl.scatter be corrected? Should we remove doc_scatter_bulk and copy-paste the relevant documentation from doc_scatter_bulk to the pl.scatter doc string? At least until pl.scatter is in good shape again.

  13. fidelram commented on Mar 25, 2019

    @fidelram
    Collaborator

    @fabianrost84 The best would be to remove doc_scatter_bulk and copy paste the relevant documentation.

  14. flying-sheep commented on Mar 26, 2019

    @flying-sheep
    Member

    copy paste

    please never say those words when speaking about code again 😜

    No but seriously: There’s at least 6 reasons not to do that and to introduce a second (temporary) variable instead: #557 (comment)

  15. added a commit that references this issue on Mar 28, 2019
    9cff5a7
  16. added a commit that references this issue on Dec 17, 2019
    54e352f
  17. added a commit that references this issue on Jan 2, 2020
    74dd052
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions