Learn R Programming

infinitefactor (version 1.0)

plotmat: Plot a matrix

Description

Plot an image of a matrix using ggplot2

Usage

plotmat(mat, color = "green", title = NULL, args = NULL)

Arguments

mat

Matrix to plot

color

Color scheme: "green", "red", or "wes"

title

optional plot title

args

optional additional ggplot arguments

Value

sends image to active graphics device or outputs a ggplot object

Examples

Run this code
# NOT RUN {
mat = diag(1:9 - 5)
plotmat(mat)
# }

Run the code above in your browser using DataLab