Learn R Programming

iheatmapr (version 0.7.1)

add_row_labels: add_row_labels

Description

Add y axis labels to plot

Usage

# S4 method for Iheatmap
add_row_labels(
  p,
  tickvals = NULL,
  ticktext = NULL,
  textangle = 0,
  font = get_layout(p)$font,
  side = c("left", "right"),
  size = 0.1,
  buffer = 0.005,
  xname = NULL,
  yname = current_yaxis(p)
)

Value

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

Arguments

p

Iheatmap-class object

tickvals

row indices at which to place axis tick labels

ticktext

text for axis tick labels

textangle

angle for ticktext

font

list of plotly font attributes, see https://plotly.com/javascript/reference/#layout-font

side

side of plot on which to add subplot

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 for xaxis

yname

internal name for yaxis

Author

Alicia Schep

See Also

add_row_title, iheatmap, add_col_labels

Examples

Run this code

mat <- matrix(rnorm(20), ncol = 5, nrow = 4)  
hm1 <- iheatmap(mat) %>% add_row_labels()
hm2 <- iheatmap(mat) %>% add_row_labels(ticktext = letters[23:26])


# Print heatmaps if interactive session 
if (interactive()) hm1
if (interactive()) hm2 

Run the code above in your browser using DataLab