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

Update scatter and update_axes #1205

Merged
merged 1 commit into from
Feb 22, 2024
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
5 changes: 4 additions & 1 deletion scvelo/plotting/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def scatter(
show=None,
save=None,
ax=None,
aspect="auto",
**kwargs,
):
"""Scatter plot along observations or variables axes.
Expand Down Expand Up @@ -770,7 +771,9 @@ def scatter(

set_label(xlabel, ylabel, fontsize, basis, ax=ax)
set_title(title, layer, color, fontsize, ax=ax)
update_axes(ax, xlim, ylim, fontsize, is_embedding, frameon, figsize)
update_axes(
ax, xlim, ylim, fontsize, is_embedding, frameon, figsize, aspect=aspect
)
if add_margin:
set_margin(ax, x, y, add_margin)
if colorbar is not False:
Expand Down
3 changes: 3 additions & 0 deletions scvelo/plotting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ def update_axes(
is_embedding=False,
frameon=None,
figsize=None,
aspect="auto",
):
"""TODO."""
if xlim is not None:
Expand Down Expand Up @@ -520,6 +521,8 @@ def update_axes(
ax.tick_params(which="both", **kwargs)
ax.set_frame_on(False)

ax.set_aspect(aspect)

if rcParams["savefig.transparent"]:
ax.patch.set_alpha(0)

Expand Down
Loading