This function is used to plot a spatial point process. This does not split data and instead puts all given data on a single plot.
Arguments
- data
Data.frame with x, y, and agent type (in that order)
- colorGuide
(Optional) String for 'guides(color=)' in ggplot2. Usually NULL or 'none' is sufficient, but ggplot2::guide_legend() can also be used for more custom results. Default is NULL.
- ptSize
(Optional) Numeric indicating point size. Default is 1.
- xlim
(Optional) Two value numeric vector indicating the size of the region in the x-direction. Default is c(min(x), max(x)).
- ylim
(Optional) Two value numeric vector indicating the size of the region in the y-direction. Default is c(min(y), max(y)).
- dropAxes
(Optional) Boolean indicating if the x and y axis title and labels should be dropped. Default is FALSE.
- layerBasedOnFrequency
(Optional) Boolean indicating if the data should be layer based on the number of agents of the type. Default is TRUE.
- colors
(Optional) Vector of colors for the points. Default is NULL, or ggplot2 selected colors.
Examples
ppplot <- plotPP(
TNBC_pheno[
TNBC_pheno$Person == 1,
c("cellx", "celly", "Phenotype")
],
colorGuide = "none"
)