Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: remove not accepted arguments from pl.scatter #557

Merged
merged 2 commits into from Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions scanpy/plotting/_anndata.py
Expand Up @@ -17,7 +17,7 @@
from . import _utils as utils
from ._utils import scatter_base, scatter_group, setup_axes
from ..utils import sanitize_anndata, doc_params
from ._docs import doc_scatter_bulk, doc_show_save_ax, doc_common_plot_args
from ._docs import doc_scatter_temp, doc_show_save_ax, doc_common_plot_args

VALID_LEGENDLOCS = {
'none', 'right margin', 'on data', 'on data export', 'best', 'upper right', 'upper left',
Expand All @@ -26,7 +26,7 @@
}


@doc_params(scatter_bulk=doc_scatter_bulk, show_save_ax=doc_show_save_ax)
@doc_params(scatter_temp=doc_scatter_temp, show_save_ax=doc_show_save_ax)
def scatter(
adata,
x=None,
Expand Down Expand Up @@ -78,7 +78,7 @@ def scatter(
`(layers, layers, layers)`.
basis : {{'pca', 'tsne', 'umap', 'diffmap', 'draw_graph_fr', etc.}}
String that denotes a plotting tool that computed coordinates.
{scatter_bulk}
{scatter_temp}
{show_save_ax}

Returns
Expand Down
11 changes: 10 additions & 1 deletion scanpy/plotting/_docs.py
Expand Up @@ -32,7 +32,7 @@
"""


doc_scatter_bulk = """\
_doc_scatter_common = """\
sort_order
For continuous annotations used as color parameter, plot data points
with higher values on top of others.
Expand Down Expand Up @@ -69,12 +69,16 @@
frameon
Draw a frame around the scatter plot. Defaults to value set in
:func:`~scanpy.api.tl.set_figure_params`, defaults to `True`.
"""
_doc_scatter_panels = """\
ncols
Number of panels per row.
wspace
Adjust the width of the space between multiple panels.
hspace
Adjust the height of the space between multiple panels.
"""
_doc_scatter_meta = """\
title
Provide title for panels either as string or list of strings,
e.g. `['title1', 'title2', ...]`.
Expand All @@ -85,6 +89,11 @@
Return the matplotlib figure.\
"""

# temporarily add a special variable doc_scatter_temp for pl.scatter
# because currently pl.scatter does not accept ncols, wspace, and hspace
doc_scatter_temp = _doc_scatter_common + _doc_scatter_meta
doc_scatter_bulk = _doc_scatter_common + _doc_scatter_panels + _doc_scatter_meta


doc_show_save_ax = """\
show
Expand Down