Skip to content

Commit

Permalink
DOC: remove ncols, wspace, hspace from pl.scatter doc (scverse#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbnrst authored and flying-sheep committed Mar 28, 2019
1 parent c063813 commit 54e352f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
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

0 comments on commit 54e352f

Please sign in to comment.