add_subplot: add_subplot

add_subplotR Documentation

add_subplot

Description

Adds an arbitrary subplot to iheatmap

Usage

## 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"
)

Arguments

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

Value

Iheatmap-class object, which can be printed to generate an interactive graphic

Author(s)

Alicia Schep

See Also

iheatmap

Examples

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 

iheatmapr documentation built on May 29, 2024, 8:55 a.m.