Description Usage Arguments Value Author(s) See Also Examples
Draw a scatterplot with grey patches as placeholders for the points. Each patch may display two distinct grey nuances (upper left and bottom right halves).
1 |
data |
nx2 matrix of points positions in the 2D space. |
maingrey |
Vector of gray intensities in [0,1] |
auxgrey |
If NULL, each patch displays only 1 grey intensity. If not NULL, its length should match maingrey, so that maingrey[i] and auxgrey[i] are the 2 grey nuances displayed by the i-th patch |
patchSize |
patch size as a ratio of the whole window. |
alpha |
If highlight is empty, this is the alpha value for all patches. Else if a set is highlighted, highlighted elements have this alpha value, and other elements have alpha/20. |
highlight |
numeric vector taking values in 1..n, indicating elements in data to highlight. Patches are associated to alpha=1 if highlighted, 0.04 if not. If no highlight is specified, all patches have alpha=1. |
labels |
text labels associated to highlighted elements. Defauts to "1" for all highlighted elements. |
NULL
Pierrick Bruneau
drawPatches
1 2 3 4 5 6 | maingrey <- runif(20)
auxgrey <- runif(20)
xvals <- c(rnorm(20, -3), rnorm(20, 3))
yvals <- rnorm(40)
plotGreyPatches(cbind(xvals, yvals), maingrey, auxgrey) # with 2 nuances per patch
plotGreyPatches(cbind(xvals, yvals), maingrey) # only one nuance
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.