autoPointSize: Automatically determine optimal point size for geom_point()

View source: R/plot_functions.R

autoPointSizeR Documentation

Automatically determine optimal point size for geom_point()

Description

Automatically determine optimal point size for geom_point()

Usage

autoPointSize(n.points, scale.factor = 10000, max.size = 2, min.size = 0.01)

Arguments

n.points

Number of data points

scale.factor

scaling constant used to determine optimal point size.

max.size

max point size

min.size

min point size

Value

optimal point size

Examples


 gg.plot <-  df.umap %>% dplyr::arrange(get(module.names[i])) %>%
      ggplot(aes(x = x, y = y, color = get(module.names[i]))) +
      geom_point(size = autoPointSize(nrow(df.umap)))


NMikolajewicz/scMiko documentation built on June 28, 2023, 1:41 p.m.