Skip to contents

Create a plot of the data stored in the database.

Usage

# S4 method for Cropmaps,character
plot(x, y, crops = NULL, year = NULL)

# S4 method for Daymet,character
plot(x, y, date = NULL)

Arguments

x

an S4 object. A product of interest.

y

character. A variable of interest.

crops

character. The crops of interest.

year

numeric. Year(s) of interest.

date

character Date(s) of interest.

Value

A plot, created with terra.

Examples

if (FALSE) {
# Define required variables
region <- Region(name = "nebraska", type = "us state",
                 div = c(country = "United States", state = "Nebraska"))
date <- date_seq("2002-01-01", "2002-12-31")

# Create the object
x <- new("Cropmaps", region = region, date = date)

# Plot
variable <- "cdl"
plot(x, variable, crops = c("Soybeans", "Winter Wheat"), year = 2002)

## Daymet Tmin

# Create the object
x <- new("Daymet", region = region, date = date, dir = dir)

# Plot
plot(x, "tmin", "2002-01-01")
}