add_subplot | R Documentation |
Adds an arbitrary subplot to iheatmap
## S4 method for signature 'Iheatmap'
add_subplot(
p,
...,
side = c("top", "bottom", "right", "left"),
layout = list(),
size = 1,
buffer = 0.1,
xname = if (side %in% c("top", "bottom")) current_xaxis(p) else NULL,
yname = if (side %in% c("left", "right")) current_yaxis(p) else NULL,
pname = "subplot"
)
p |
iheatmap object |
... |
arguments to pass to plotly trace, see plotly.js documentation at https://plotly.com/javascript/reference/ |
side |
which side of the current plot to add this heatmap? "right", "left","top", or "bottom" |
layout |
axis layout parameters (list) |
size |
relative size of plot. size relative to first heatmap |
buffer |
amount of space to leave empty before this plot, relative to size of first heatmap |
xname |
internal name of xaxis |
yname |
internal name of yaxis |
pname |
internal name of plot |
Iheatmap-class
object, which can be printed to generate
an interactive graphic
Alicia Schep
iheatmap
mat <- matrix(rnorm(24), ncol = 6)
hm <- iheatmap(mat) %>% add_subplot(x = 1:5, y=1:5, side = "top")
# Print heatmap if interactive session
if (interactive()) hm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.