Plot trait density and data

plot_trait(
  trait,
  prior = NULL,
  posterior.sample = NULL,
  trait.df = NULL,
  fontsize = list(title = 18, axis = 14),
  x.lim = NULL,
  y.lim = NULL,
  logx = FALSE
)

Arguments

trait

dataframe with id, figid and units of the trait to be plotted

prior

named distribution with parameters

posterior.sample

samples from posterior distribution whose density should be plotted

trait.df

data to be plotted, in a format accepted by jagify

fontsize, x.lim, y.lim, logx

passed on to ggplot

Value

plot (grob) object

Author

David LeBauer

Examples

if (FALSE) { # \dontrun{
prior1 <- data.frame(distn = 'norm',
                     parama = 20,
                     paramb = 5)
data1  <- data.frame(Y = c(19, 21), se = c(1,1))
trait1 <- data.frame(id = 'Vcmax', figid = 'Vcmax', units = 'umol CO2 m-2 s-1')
plot_trait(trait = trait1,
          prior = prior1,
          trait.df = data1)
} # }