diff --git a/scvelo/plotting/scatter.py b/scvelo/plotting/scatter.py index 2a8c2aa3..cd4c452a 100644 --- a/scvelo/plotting/scatter.py +++ b/scvelo/plotting/scatter.py @@ -119,6 +119,7 @@ def scatter( show=None, save=None, ax=None, + aspect="auto", **kwargs, ): """Scatter plot along observations or variables axes. @@ -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: diff --git a/scvelo/plotting/utils.py b/scvelo/plotting/utils.py index 0f59918f..fc432d85 100644 --- a/scvelo/plotting/utils.py +++ b/scvelo/plotting/utils.py @@ -466,6 +466,7 @@ def update_axes( is_embedding=False, frameon=None, figsize=None, + aspect="auto", ): """TODO.""" if xlim is not None: @@ -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)