ggmat: Create a matrix plot

Description Usage Arguments Value See Also Examples

View source: R/ggmat.R

Description

This function is the equivalent of ggplot in ggplot2.

Usage

1

Arguments

data

list of matrix-like object or matrix_tbl.

...

other params passing to matrixs_to_df.

Value

an object of class gg onto which layers, scales, etc. can be added.

See Also

matrixs_to_df.

Examples

1
2
3
4
5
6
7
8
ggmat(list(mtcars = mtcars))
m1 <- matrix(rnorm(100), nrow = 20)
m2 <- matrix(rnorm(100), nrow = 20)
ggmat(list(m1 = m1, m2 = m2)) + geom_triangle(aes(fill = m1))
ggmat(list(m1 = m1, m2 = m2)) +
  geom_triangle(aes(fill.upper = m1, fill.lower = m2)) +
  scale_fill_upper_gradientn(colours = c("red", "white", "blue")) +
  scale_fill_lower_gradientn(colours = c("#E9A3C9", "#F7F7F7", "#A1D76A"))

houyunhuang/ggtriangle documentation built on May 11, 2020, 2:02 p.m.