alanocallaghan / scater

Clone of the Bioconductor repository for the scater package.
https://bioconductor.org/packages/devel/bioc/html/scater.html
94 stars 40 forks source link

add point_shape argument #178

Closed Yunuuuu closed 1 year ago

Yunuuuu commented 1 year ago

This commit just enable the customization of point shape The current version (without point_shape argument) ofter return a plot with large point:

scater::plotReducedDim(
    sce_clean,
    dimred = "UMAP",
    colour_by = "Sample",
    point_size = 0.01,
    point.padding = 0,
    force = 0,
    rasterise = TRUE
) 

image

By adjusting to the point_shape argument we can produce a plot with smaller point:

scater::plotReducedDim(
    sce_clean,
    dimred = "UMAP",
    colour_by = "Sample",
    point_shape = 16,
    point_size = 0.01,
    point.padding = 0,
    force = 0,
    rasterise = TRUE
)

image

alanocallaghan commented 1 year ago

Looks good! Could you document point_shape in R/plotPlatePosition.R and R/plotReducedDim.R please?

Yunuuuu commented 1 year ago

I have added the document and add a link to vignette("ggplot2-specs"), so users can easily see which shape integer or string to use.

Thanks for the development of the excellent and practicable single-cell package, hope this commit can be helpful.

alanocallaghan commented 1 year ago

Thanks for the excellent contribution!