Description Usage Arguments Value Author(s) Examples
Creates a density scatterplot highlighting points in sparsely populated plot regions as well as points marked as special in a seperate color
1 2 3 4 5 6 7 8 9 | create.densityScatter(
df2p,
is.special = NULL,
dens.subsample = FALSE,
dens.special = TRUE,
sparse.points = 0.01,
dens.n = 100,
add.text.cor = FALSE
)
|
df2p |
|
is.special |
boolean vector of length equal to the number of rows in |
dens.subsample |
if the number of points exceeds this number, subsample the number of points for the density estimation to that number. Any non-numeric value disables subsampling. |
dens.special |
Flag indicating whether the points of the special population should be colored according to their density |
sparse.points |
Either percentage ( |
dens.n |
passed on to |
add.text.cor |
flag indicating whether a text token with the correlation coefficient should be included in the lower right corner of the plot |
ggplot
object
Fabian Mueller
1 2 3 4 | d <- data.frame(x=rnorm(1000),y=rnorm(1000))
s <- rep(FALSE,1000)
s[sample(1:length(s),100)] <- TRUE
create.densityScatter(d,s)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.