Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/release-notes/3894.docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove a few falsely advertised parameters from {func}`scanpy.pl.scatter` {smaller}`P Angerer`
39 changes: 21 additions & 18 deletions src/scanpy/plotting/_anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,24 +426,27 @@ def _scatter_obs( # noqa: PLR0912, PLR0913, PLR0915
key.replace("_", " ") if not is_color_like(key) else "" for key in keys
]

axs: list[Axes] = scatter_base(
xy,
title=title,
alpha=alpha,
component_name=component_name,
axis_labels=axis_labels,
component_indexnames=components + 1,
projection=projection,
colors=color_ids,
highlights=highlights,
colorbars=colorbars,
right_margin=right_margin,
left_margin=left_margin,
sizes=[size for _ in keys],
markers=marker,
color_map=color_map,
show_ticks=show_ticks,
ax=ax,
axs = cast(
"list[Axes]",
scatter_base(
xy,
title=title,
alpha=alpha,
component_name=component_name,
axis_labels=axis_labels,
component_indexnames=components + 1,
projection=projection,
colors=color_ids,
highlights=highlights,
colorbars=colorbars,
right_margin=right_margin,
left_margin=left_margin,
sizes=[size for _ in keys],
markers=marker,
color_map=color_map,
show_ticks=show_ticks,
ax=ax,
),
)

def add_centroid(centroids, name, xy, mask) -> None:
Expand Down
18 changes: 9 additions & 9 deletions src/scanpy/plotting/_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,11 @@
legend_fontoutline
Line width of the legend font outline in pt. Draws a white outline using
the path effect :class:`~matplotlib.patheffects.withStroke`.
colorbar_loc
Where to place the colorbar for continous variables. If `None`, no colorbar
is added.
size
Point size. If `None`, is automatically computed as 120000 / n_cells.
Can be a sequence containing the size for each cell. The order should be
the same as in adata.obs.
{doc_cm_palette}
na_color
Color to use for null or masked values. Can be anything matplotlib accepts as a
color. Used for all points if `color=None`.
na_in_legend
If there are missing values, whether they get an entry in the legend. Currently
only implemented for categorical legends.
frameon
Draw a frame around the scatter plot. Defaults to value set in
:func:`~scanpy.set_figure_params`, defaults to `True`.
Expand Down Expand Up @@ -172,6 +163,15 @@
# Docs for pl.pca, pl.tsne, … (everything in _tools.scatterplots)
doc_scatter_embedding = f"""\
{doc_scatter_basic}
colorbar_loc
Where to place the colorbar for continous variables. If `None`, no colorbar
is added.
na_color
Color to use for null or masked values. Can be anything matplotlib accepts as a
color. Used for all points if `color=None`.
na_in_legend
If there are missing values, whether they get an entry in the legend. Currently
only implemented for categorical legends.
{doc_vbound_percentile}
{doc_outline}
{doc_panels}
Expand Down
2 changes: 1 addition & 1 deletion src/scanpy/plotting/_tools/scatterplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def embedding( # noqa: PLR0912, PLR0913, PLR0915
legend_fontweight: int | _FontWeight = "bold",
legend_loc: _LegendLoc | None = "right margin",
legend_fontoutline: int | None = None,
colorbar_loc: str | None = "right",
colorbar_loc: Literal["right", "left", "top", "bottom"] | None = "right",
vmax: VBound | Sequence[VBound] | None = None,
vmin: VBound | Sequence[VBound] | None = None,
vcenter: VBound | Sequence[VBound] | None = None,
Expand Down
2 changes: 1 addition & 1 deletion src/scanpy/plotting/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ def circles(
--------
a = np.arange(11)
circles(a, a, s=a*0.2, c=a, alpha=0.5, ec='none')
pl.colorbar()
plt.colorbar()
License
--------
This code is under [The BSD 3-Clause License]
Expand Down
Loading