Plot a heatmap
image_with_text(
mat,
xlab = "",
ylab = "",
main = NULL,
main_shift = 0.12,
col_names = colnames(mat),
row_names = rownames(mat),
row_text_adj = 1,
row_text_shift = 0,
row_text_rotation = 0,
col_text_rotation = 90,
col_text_adj = 1,
col_text_shift = 0,
show_text = TRUE,
cex = 0.5,
col_text_cex = 1,
row_text_cex = 1,
main_cex = 1,
split_at_vals = FALSE,
split_points = 0,
col_scale = "gray",
color_spread = 50,
light_dark = "f",
class_mat = NULL,
grad_dir = c("high", "low", "middle", "ends"),
color_fun = c("linear", "exponential"),
exp_steepness = 1,
global_color_scale = FALSE,
global_min = NULL,
global_max = NULL,
sig_digs = 3,
use_pheatmap_colors = FALSE,
na_col = "lightgray",
gridlines = FALSE
)
None
A numeric matrix to plot as a heat map
A string label for the x axis
A string label for the y axis
A title for the plot
A numeric value to shift the title along the y axis.
A vector of strings indicating names for the columns of the matrix. Defaults to existing column names.
A vector of strings indicating names for the rows of the matrix. Defaults to existing row names.
adjustment value for row text indicating
the centering. See text
.
numeric value for shifting the row labels toward or away from the matrix.
Rotation value in degrees for the row labels
Rotation value in degrees for the column labels
adjustment value for column text indicating
the centering. See text
.
numeric value for shifting the column labels toward or away from the matrix.
Whether to write the numerical value of each cell in the plot.
The size of the text when show_text is TRUE
The size of the column labels
The size of the row labels
The size of the title of the plot
Whether to split the values into different color classes
If split_at_vals is TRUE, split_points determines the boundaries of the classes. For example, if split_points is 0, negative and positive numbers will be assigned to different color classes.
One of c("green", "purple", "orange", "blue", "brown", "gray") to indicate the color scale to be used. Defaults to gray.
A numerical value used as input to
get_color2
indicating the numeric distance
between colors in a ramp. Smaller values produce a smaller
difference between adjacent colors in the ramp.
One of "l", "d", or "f" indicating whether the colors used should be light ("l"), dark ("d"), or from across the full spectrum ("f").
An optional numeric matrix defining the color classes of each cell in the matrix. If omitted this is calculated by the function.
A string specifying how the color gradient should be applied. If "high" higher values are given darker colors. If "low", lower values are given darker colors. If "middle" values in the middle of the spectrum are given darker colors, and if "end" values at the ends of the spectrum are given darker colors.
Either "linear" or "exponential" indicating how the colors should transition from light to dark across values.
If color_fun is "exponential," exp_steepness indicates how quickly the colors should transition from light to dark.
Whether to impose a global minimum and maximum to the colors, or to use the values themselves to determine the top and bottom of the color scale.
If global_color_scale is TRUE, the minimum value that should be assigned a color.
If global_color_scale is TRUE, the maximum value that should be assigned a color.
The number of significant figures to use from the input matrix. Helpful primarily when show_text is TRUE.
If TRUE, all other color parameters are ignored, and colors like those used in the R package pheatmap are used instead.
The color to use for missing values.
Whether to plot gridlines on the matrix.