This function is a wrapper around ggplot geom_point to allow for a more intuitive plotting of ArchR data.

ggPoint(
  x = NULL,
  y = NULL,
  color = NULL,
  discrete = TRUE,
  discreteSet = "stallion",
  continuousSet = "solarExtra",
  labelMeans = TRUE,
  pal = NULL,
  defaultColor = "lightGrey",
  highlightPoints = NULL,
  colorDensity = FALSE,
  size = 1,
  xlim = NULL,
  ylim = NULL,
  extend = 0.05,
  xlabel = "x",
  ylabel = "y",
  title = "",
  randomize = FALSE,
  seed = 1,
  colorTitle = NULL,
  colorOrder = NULL,
  colorLimits = NULL,
  alpha = 1,
  baseSize = 10,
  legendSize = 3,
  ratioYX = 1,
  labelAsFactors = TRUE,
  fgColor = "black",
  bgColor = "white",
  bgWidth = 1,
  labelSize = 3,
  addFit = NULL,
  rastr = FALSE,
  dpi = 300,
  ...
)

Arguments

x

A numeric vector containing the x-axis values for each point.

y

A numeric vector containing the y-axis values for each point.

color

A numeric/categorical vector used to determine the coloration for each point.

discrete

A boolean value indicating whether the supplied data is discrete (TRUE) or continuous (FALSE).

discreteSet

The name of a custom palette from ArchRPalettes to use for categorical/discrete color. This argument is only used if discrete is set to TRUE.

continuousSet

The name of a custom palette from ArchRPalettes to use for numeric color. This argument is only used if discrete is set to FALSE.

labelMeans

A boolean value indicating whether the mean of each categorical/discrete color should be labeled.

pal

A custom palette used to override discreteSet/continuousSet for coloring vector.

defaultColor

The default color for points that do not have another color applied (i.e. NA values).

highlightPoints

A integer vector describing which points to hightlight. The remainder of points will be colored light gray.

colorDensity

A boolean value indicating whether the density of points on the plot should be indicated by color. If TRUE, continuousSet is used as the color palette.

size

The numeric size of the points to be plotted.

xlim

A numeric vector of two values indicating the lower and upper bounds of the x-axis on the plot.

ylim

A numeric vector of two values indicating the lower and upper bounds of the y-axis on the plot.

extend

A numeric value indicating the fraction to extend the x-axis and y-axis beyond the maximum and minimum values if xlim and ylim are not provided. For example, 0.05 will extend the x-axis and y-axis by 5 percent on each end.

xlabel

The label to plot for the x-axis.

ylabel

The label to plot for the y-axis.

title

The title of the plot.

randomize

A boolean value indicating whether to randomize the order of the points when plotting.

seed

A numeric seed number for use in randomization.

colorTitle

A title to be added to the legend if color is supplied.

colorOrder

A vector that allows you to control the order of palette colors associated with the values in color. For example if you have color as c("a","b","c") and want to have the first color selected from the palette be used for "c", the second color for "b", and the third color for "a", you would supply the colorOrder as c("c", "b", "a").

colorLimits

A numeric vector of two values indicating the lower and upper bounds of colors if numeric. Values beyond these limits are thresholded.

alpha

A number indicating the transparency to use for each point. See ggplot2 for more details.

baseSize

The base font size (in points) to use in the plot.

legendSize

The size in inches to use for plotting the color legend.

ratioYX

The aspect ratio of the x and y axes on the plot.

labelAsFactors

A boolean indicating whether to label the color input as a numeric factor (TRUE) or with a character string (FALSE).

fgColor

The foreground color of the plot.

bgColor

The background color of the plot.

bgWidth

The background relative width size of the halos in the labeling.

labelSize

The numeric font size of labels.

addFit

A string indicating the method to use for adding a fit/regression line to the plot (see ggplot2::geom_smooth() methods). If set to NULL, no fit/regression line is added.

rastr

A boolean value that indicates whether the plot should be rasterized using ggrastr. This does not rasterize lines and labels, just the internal portions of the plot.

dpi

The resolution in dots per inch to use for the plot.