ggplot: ggplot method for various FLR classes

ggplot,FLQuant-methodR Documentation

ggplot method for various FLR classes

Description

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.

Usage

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

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

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

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

## S4 method for signature '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

See Also

ggplot, https://github.com/flr/ggplotFL/

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)

flr/ggplotFL documentation built on Feb. 10, 2024, 3:57 p.m.