fortify.list: Fortify method for x, y, z lists.

Description Usage Arguments Examples

View source: R/fortify-list.R

Description

This function turns a list with components x, y, z, such as those used by image and image into a data frame that can more easily be plotted with ggplot2.

Usage

1
2
## S3 method for class 'list'
fortify(model, data, ...)

Arguments

model

list with components x, y and z

data

not used by this method

...

not used by this method

Examples

1
2
3
4
5
6
7
8
x <- seq(0, 1, by=0.1)
y <- seq(0, 2, by=0.1)
z <- outer(x, y, "+") 
d <- list(x=x, y=y, z=z)
image(d)
persp(d)
head(fortify(d))
ggplot(d) + geom_tile(aes(x=x, y=y, fill=z))

jiho/autoplot documentation built on May 19, 2019, 9:29 a.m.