ggOneToOne.Rd
This function is a wrapper around ggplot geom_point to allow for plotting one-to-one sample comparisons in ArchR.
ggOneToOne(
x = NULL,
y = NULL,
size = 2,
alpha = 1,
xlabel = "x",
ylabel = "y",
title = "Correlation",
min = 0.05,
max = 0.9999,
nPlot = 100 * 10^3,
nKernel = 100,
densityMax = 0.95,
extend = 0.05,
baseSize = 6,
rastr = TRUE,
pal = paletteContinuous(set = "blueYellow"),
...
)
A numeric vector containing the x-axis values for each point.
A numeric vector containing the y-axis values for each point.
The numeric size of the points to plot.
A number indicating the transparency to use for each point. See ggplot2
for more details.
The label to plot for the x-axis.
The label to plot for the y-axis.
The title of the plot.
The lower limit of the x and y axes as a numeric quantile between 0 and 1.
The upper limit of the x and y axes as a numeric quantile between 0 and 1.
The number of points to plot. When this value is less than the total points, the sample
function is used to extract random data points to be plotted.
The number of grid points in each direction to use when computing the kernel with MASS::kde2d()
.
The quantile that should be represented by the maximum color on the continuous scale designated by pal
. Values above densityMax
will be thresholded to the maximum color on the color scale.
A numeric value indicating the fraction to extend the x-axis and y-axis beyond the maximum value on either axis. For example, 0.05 will extend the x-axis and y-axis by 5 percent on each end beyond quantile(c(x,y), max)
and quantile(c(x,y), min)
.
The base font size (in points) to use in the plot.
A boolean value that indicates whether the plot should be rasterized. This does not rasterize lines and labels, just the internal portions of the plot.
A custom palette from ArchRPalettes
used to display the density of points on the plot.
Additional params to be supplied to ggPoint
# Create Random Data
m <- data.frame(matrix(rnorm(20, 2),ncol=2))
# Plot
p <- ggOneToOne(x = m[,1], y = m[,2])
# To PDF
pdf("test.pdf", width = 4, height = 4)
p
dev.off()