ez.heatmap: plot a heatmap with values shown

View source: R/plot.R

ez.heatmapR Documentation

plot a heatmap with values shown

Description

plot a heatmap with values shown

Usage

ez.heatmap(
  df,
  id,
  show.values = F,
  remove.zero = T,
  angle = 270,
  colors = c("blue", "white", "red"),
  basesize = 9,
  xsize = 1,
  ysize = 1,
  legend.position = "right",
  theme.apa = TRUE
)

Arguments

df

data frame in wide format, like a correlation matrix

id

a column name as id, will be shown as x axis, quoted ""

show.values

whether to show values in addition to color in the plot

remove.zero

remove the leading 0 as in correlation, 0.02->.02 (0.00 becomes "<.01")
only works when show.value=T

angle

the x axis label angle, default=270 (vertical), suggests 330 if label is not too long

colors

low, middle, high

basesize

base font size

xsize

x axis label font relative size

ysize

y axis label font relative size

legend.position

"bottom", "top", "left", "right", "none"

Value

a ggplot object (+theme_apa() to get apa format plot)


jerryzhujian9/ezmisc documentation built on March 9, 2024, 12:44 a.m.