Creates an interactive heatmap, with each cell linked to
plots of horizontal and vertical slices
Usage
iheatmap(z, x = NULL, y = NULL, chartOpts = NULL, digits = 5)
Value
An object of class `htmlwidget` that will
intelligently print itself into HTML in a variety of contexts
including the R console, within R Markdown documents, and within
Shiny output bindings.
Arguments
z
Numeric matrix of dim `length(x)` x `length(y)`
x
Vector of numeric values for the x-axis
y
Vector of numeric values for the y-axis
chartOpts
A list of options for configuring the chart (see
the coffeescript code). Each element must be named using the
corresponding option.
digits
Round data to this number of significant digits
before passing to the chart function. (Use NULL to not round.)
Details
By default, the z-axis limits are from `-max(abs(z))`
to `max(abs(z))`, and negative cells are colored blue to white
which positive cells are colored white to red.
n <- 101
x <- y <- seq(-2, 2, len=n)
z <- matrix(ncol=n, nrow=n)
for(i in seq(along=x))
for(j in seq(along=y))
z[i,j] <- x[i]*y[j]*exp(-x[i]^2 - y[j]^2)
# \donttest{iheatmap(z, x, y)# }