add_col_barplot: add_col_barplot

Description Usage Arguments Value Author(s) See Also Examples

Description

Add bar plot with one bar per column above or below a main heatmap

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S4 method for signature 'Iheatmap'
add_col_barplot(
  p,
  y,
  ...,
  color = NULL,
  tracename = NA_character_,
  showlegend = !is.na(tracename),
  side = c("top", "bottom"),
  layout = list(),
  size = 0.2,
  buffer = 0.02,
  xname = current_xaxis(p),
  yname = NULL,
  pname = if (!is.na(tracename)) tracename else "col_barplot"
)

Arguments

p

iheatmap object

y

y axis values

...

additional arguments to add to plotly scatter trace, see https://plotly.com/javascript/reference/#scatter

color

color of bars

tracename

name of trace (for legend and hover)

showlegend

show in legend?

side

side of plot on which to add subplot

layout

yaxis layout list

size

relative size of subplot relative to main 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

add_col_signal, iheatmap, add_col_plot

Examples

1
2
3
4
5
mat <- matrix(rnorm(20), ncol = 5, nrow = 4)  
hm <- iheatmap(mat) %>% add_col_barplot(y = 1:5, tracename = "Strength")

# Print heatmap if interactive session 
if (interactive()) hm 

iheatmapr documentation built on Jan. 13, 2021, 5:11 p.m.