The ggplot() method has been conveniently overloaded for various FLR classes. A call to as.data.frame takes place on data before passing all arguments to the original ggplot function.

# S4 method for FLQuant
ggplot(data = NULL, mapping = aes(), ..., environment = parent.frame())

# S4 method for FLQuants
ggplot(data = NULL, mapping = aes(), ..., environment = parent.frame())

# S4 method for FLComp
ggplot(data = NULL, mapping = aes(), ..., environment = parent.frame())

# S4 method for FLComps
ggplot(data = NULL, mapping = aes(), ..., environment = parent.frame())

# S4 method for FLPar
ggplot(data = NULL, mapping = aes(), ..., environment = parent.frame())

Arguments

data

An FLQuant object

mapping

An aesthetic mapping, from a call to aes

...

Other arguments to be passod on to ggplot

environment

Where to look for an undefined plot variable.

Details

Please look at the relevant as.data.frame method for each class to understand the naming conventions used in the resulting data.frame

Examples

   dat <- rnorm(1, FLQuant(1, dim=c(5,10)), 0.5)
   ggplot(data=dat, aes(data, year)) + geom_point() 

   data(ple4)
   dat <- FLQuants(catch=catch(ple4), ssb=ssb(ple4))
   ggplot(data=dat, aes(data, year)) + geom_point() + facet_wrap(~qname)