scverse / pytometry

Flow & mass cytometry analytics.

Home Page:https://pytometry.readthedocs.io/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adjust limits of X or Y axis using pm.pl.scatter_density function

mlukosev opened this issue · comments

Hi, I am trying to change the y-axis limit of the pm.pl.scatter_density plot, however I am getting error: AttributeError: module 'pytometry.plotting' has no attribute 'ylim', when I try to define axis limits using for example this:
ax = pm.pl.scatter_density(adata)
ax.set_ylim(0,12000);

Is there a way to do this?
Many thanks!

Hi @mlukosev

Thank you for the request.
The density_scatter function uses the arguments x_lim and y_lim as arguments.

pm.pl.scatter_density(adata, y_lim= [0, 12000])