create.scatter.dens.points {RnBeads} | R Documentation

## create.scatter.dens.points

### Description

Creates a scatterplot containing all points in a given data.frame. Points are colored according to point density. Optionally, a selection of points are shown in a different color

### Usage

    create.scatter.dens.points(df2p, is.special = NULL, dens.special = TRUE,
      mock = FALSE)

### Arguments

`df2p` | `data.frame` to be plotted. Only the fist two columns are taken into account as x and y coordinates respectively
`is.special` | boolean vector of length equal to the number of rows in `df2p`. Specifies which points should be highlighed seperately in a different color
`dens.special` | Flag indicating whether the points of the special population should be colored according to their density
`mock` | Should only the axis be plotted? useful when exporting scatterplots with lots of points as immage and the corresponding axis as vector graphics.

### Value

`ggplot` object

### Author(s)

Fabian Mueller

### Examples

    d <- data.frame(x=rnorm(1000),y=rnorm(1000))
    s <- rep(FALSE,1000)
    s[sample(1:length(s),100)] <- TRUE
    create.scatter.dens.points(d,s)

[Package RnBeads version 1.10.8 Index]