scater-plot-args: General visualization parameters

scater-plot-argsR Documentation

General visualization parameters

Description

scater functions that plot points share a number of visualization parameters, which are described on this page.

Aesthetic parameters

add_legend:

Logical scalar, specifying whether a legend should be shown. Defaults to TRUE.

theme_size:

Integer scalar, specifying the font size. Defaults to 10.

point_alpha:

Numeric scalar in [0, 1], specifying the transparency. Defaults to 0.6.

point_size:

Numeric scalar, specifying the size of the points. Defaults to NULL.

point_shape:

An integer, or a string specifying the shape of the points. Details see vignette("ggplot2-specs"). Defaults to 19.

jitter_type:

String to define how points are to be jittered in a violin plot. This is either with random jitter on the x-axis ("jitter") or in a “beeswarm” style (if "swarm", default). The latter usually looks more attractive, but for datasets with a large number of cells, or for dense plots, the jitter option may work better.

Distributional calculations

show_median:

Logical, should the median of the distribution be shown for violin plots? Defaults to FALSE.

show_violin:

Logical, should the outline of a violin plot be shown? Defaults to TRUE.

show_smooth:

Logical, should a smoother be fitted to a scatter plot? Defaults to FALSE.

show_se:

Logical, should standard errors for the fitted line be shown on a scatter plot when show_smooth=TRUE? Defaults to TRUE.

show_boxplot:

Logical, should a box plot be shown? Defaults to FALSE.

Miscellaneous fields

Addititional fields can be added to the data.frame passed to ggplot by setting the other_fields argument. This allows users to easily incorporate additional metadata for use in further ggplot operations.

The other_fields argument should be character vector where each string is passed to retrieveCellInfo (for cell-based plots) or retrieveFeatureInfo (for feature-based plots). Alternatively, other_fields can be a named list where each element is of any type accepted by retrieveCellInfo or retrieveFeatureInfo. This includes AsIs-wrapped vectors, data.frames or DataFrames.

Each additional column of the output data.frame will be named according to the name returned by retrieveCellInfo or retrieveFeatureInfo. If these clash with inbuilt names (e.g., X, Y, colour_by), a warning will be raised and the additional column will not be added to avoid overwriting an existing column.

See Also

plotColData, plotRowData, plotReducedDim, plotExpression, plotPlatePosition, and most other plotting functions.


Alanocallaghan/scater documentation built on July 18, 2024, 10:58 p.m.