Learn R Programming

inlabru (version 2.11.1)

gg.matrix: Geom for matrix

Description

Creates a tile geom for plotting a matrix

Usage

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

Value

A geom_tile with reversed y scale.

Arguments

data

A matrix object.

mapping

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

...

Arguments passed on to geom_tile.

Details

Requires the ggplot2 package.

See Also

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

Examples

Run this code
if (require("ggplot2", quietly = TRUE)) {
  A <- matrix(runif(100), nrow = 10)
  ggplot() +
    gg(A)
}

Run the code above in your browser using DataLab