Automatically determine optimal point size for geom_point()

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)))
#> Error in dplyr::arrange(., get(module.names[i])): object 'df.umap' not found