Learn R Programming

inlabru (version 2.3.1)

gg.matrix: Geom for matrix

Description

Creates a tile geom for plotting a matrix

Usage

# S3 method for matrix
gg(data, mapping = NULL, ...)

Arguments

data

A matrix object.

mapping

a set of aesthetic mappings created by aes or aes_. These are passed on to geom_tile.

...

Arguments passed on to geom_tile.

Value

A geom_tile with reversed y scale.

See Also

Other geomes for inla and inlabru predictions: gg.data.frame(), gg.prediction(), gg(), gm()

Examples

Run this code
# NOT RUN {
A <- matrix(runif(100), nrow = 10)
ggplot() +
  gg(A)
# }

Run the code above in your browser using DataLab