Description Usage Arguments See Also Examples
Interactive scatter plot with labelled points.
If labels
is a vector, points are labeled as-is and recycled if
necessary. Optionally, labels
can be a named list where each
element of the list is a character vector (or one which can be coerced)
having the same length of x
; see examples. If x
and y
are named vectors, points will be labeled without needing to use
labels
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
x, y |
vectors of x- and y-coordinates; if |
group |
vector of group ( |
col |
a vector of colors for each unique |
cex |
point size in pixels |
xlim, ylim |
x- and y-limits |
xlab, ylab, main |
the x-, y-, and main labels |
labels |
optional character vector or named list of character vectors
to label each point; if |
plotOpts |
list of additional plot options; see
|
digits |
integer indicating number of significant digits to use |
iplot
from the qtlcharts package
Other iplots:
icorr()
,
icurve()
,
idot()
,
itree()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## basic usage
iscatter(1:5, col = 1:5)
## using named vectors
x <- with(mtcars, setNames(mpg, mpg))
y <- with(mtcars, setNames(wt, wt))
iscatter(x, y)
## using the labels parameter
with(mtcars, {
iscatter(wt, mpg, group = cyl, col = 1:3,
main = 'Motor Trend car road tests',
labels = list(model = rownames(mtcars), mpg = mpg, hp = hp))
})
## compare with base graphics
with(mtcars, plot(wt, mpg, col = factor(cyl), pch = 19))
## labels parameter supports additional formatting with html tags
with(ivolcano, {
iscatter(logFC, -log10(pval), group = pval < 0.05 & abs(logFC) > 1,
col = c('lightgrey','green'),
labels = list(
' ' = rownames(ivolcano),
'log<sub>2</sub>(FC)' = round(logFC, 2),
'<em>p</em>-value' =
format.pval(ivolcano$pval, digits = 2, eps = .05)))
})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.