Learn R Programming

sits (version 0.13.0)

plot: Generic interface for ploting time series

Description

This is a generic function. Parameters depend on the specific type of input. See each function description for the required parameters:

In the case of time series, the plot function produces different plots based on the input data:

  • "all years": Plot all samples from the same location together

  • "together": Plot all samples of the same band and label together

The plot.sits function makes an educated guess of what plot is required, based on the input data. If the input data has less than 30 samples, it will default to "all years". If there are more than 30 samples, it will default to "together".

Usage

# S3 method for sits
plot(x, y, ..., colors = "Dark2")

Arguments

x

object of class "sits"

y

ignored

...

further specifications for plot.

colors

Color palette to be used (based on Color Brewer - default is "Dark2").

Value

The plot itself.

Examples

Run this code
# NOT RUN {
# Read a set of samples with 2 classes ("Cerrado" and "Pasture")
# Plot all the samples together
plot(cerrado_2classes)
# Plot the first 20 samples (defaults to "allyears")
plot(cerrado_2classes[1:20, ])
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab