Skip to contents

Plots a landscape object as a ggplot2.

Usage

# S3 method for class 'landscape'
plot(x, ...)

Arguments

x

A landscape object created by landscape.

...

Must be empty.

Value

A ggplot2 object.

Details

Add ggplot2 layers directly to the result, or use plot_landscapes for titles, legends, and multi-panel layouts.

Examples

# Create a landscape (0 = bare ground, 1 = vegetation)
mat <- matrix(rbinom(100, 1, 0.5), 10, 10)
l <- landscape(mat, pattern = "random", name = "example")

# Get basic plot
p <- plot(l)

# Add your own customization
p + ggplot2::ggtitle("My custom title") +
    ggplot2::theme_dark()