cellestial.xyplots#
- xyplots(data: AnnData, x: str | Sequence[str], y: str | Sequence[str], *, mapping: FeatureSpec | None = None, axis: Literal[0, 1] | None = None, tooltips: Literal['none'] | Sequence[str] | FeatureSpec | None = None, interactive: bool = False, observations_name: str = 'Barcode', variables_name: str = 'Variable', include_dimensions: bool | int = False, layers: Sequence[FeatureSpec | LayerSpec] | FeatureSpec | LayerSpec | None = None, ncol: int | None = None, sharex: str | None = None, sharey: str | None = None, widths: list[float] | None = None, heights: list[float] | None = None, hspace: float | None = None, vspace: float | None = None, fit: bool | None = None, align: bool | None = None, guides: str = 'auto', **point_kwargs) SupPlotsSpec#
Scatter Plots.
- Parameters:
data (
AnnData) – The AnnData object of the single cell data.x (
str) – The key(s) for the x-axis.y (
str) – The key(s) for the y-axis.mapping (
FeatureSpec | None, defaultNone) – Additional aesthetic mappings for the plot, the result of aes().axis (
{0,1}| None, defaultNone) – axis of the data, 0 for observations and 1 for variables.tooltips (
{'none'}| Sequence[str] | FeatureSpec | None, defaultNone) – Tooltips to show when hovering over the geom. Accepts Sequence[str] or result of layer_tooltips() for more complex tooltips. Use ‘none’ to disable tooltips.interactive (
bool, defaultFalse) – Whether to make the plot interactive.observations_name (
str, default'Barcode') – The name to give to barcode (or index) column in the dataframe.variables_name (
str, default'Variable') – The name to give to variable index column in the dataframe.include_dimensions (
bool | int, defaultFalse) – Whether to include dimensions in the DataFrame. Providing an integer will limit the number of dimensions to given number.layers (
Sequence[FeatureSpec|LayerSpec] | FeatureSpec | LayerSpec | None, defaultNone) – Layers to add to all the plots in the grid.ncol (
int, defaultNone) – Number of columns in grid. If not specified, shows plots horizontally, in one row.sharex (
bool, defaultNone) – Controls sharing of axis limits between subplots in the grid. all/True - share limits between all subplots. none/False - do not share limits between subplots. row - share limits between subplots in the same row. col - share limits between subplots in the same column.sharey (
bool, defaultNone) – Controls sharing of axis limits between subplots in the grid. all/True - share limits between all subplots. none/False - do not share limits between subplots. row - share limits between subplots in the same row. col - share limits between subplots in the same column.widths (
list[float], defaultNone) – Relative width of each column of grid, left to right.heights (
list[float], defaultNone) – Relative height of each row of grid, top-down.hspace (
float | None = None) – Cell horizontal spacing in px.vspace (
float | None = None) – Cell vertical spacing in px.fit (
bool, defaultTrue) – Whether to stretch each plot to match the aspect ratio of its cell (fit=True), or to preserve the original aspect ratio of plots (fit=False).align (
bool, defaultFalse) – If True, align inner areas (i.e. “geom” bounds) of plots. However, cells containing other (sub)grids are not participating in the plot “inner areas” layouting.guides (
str, default'auto') –- Specifies how guides (legends and colorbars) should be treated in the layout.
’collect’ collect guides from all subplots, removing duplicates.
’keep’ keep guides in their original subplots; do not collect at this level.
’auto’ allow guides to be collected if an upper-level layout uses guides=’collect’;
otherwise, keep them in subplots. Duplicates are identified by comparing visual properties: For legends: title, labels, and all aesthetic values (colors, shapes, sizes, etc.). For colorbars: title, domain limits, breaks, and color gradient.
For more information on gggrid parameters: https://lets-plot.org/python/pages/api/lets_plot.gggrid.html
**point_kwargs – Additional parameters for the geom_point layer. For more information on geom_point parameters, see: https://lets-plot.org/python/pages/api/lets_plot.geom_point.html
- Returns:
PlotSpec– Scatter plot.