tor_plot: Plot raw data and predicted values of a fitted model

View source: R/tor_plot.R

tor_plotR Documentation

Plot raw data and predicted values of a fitted model

Description

tor_plot() provides a plot of the metabolic rate (M) values over the respective ambient temperature (Ta).

Usage

tor_plot(
  tor_obj = NULL,
  plot_type = "base",
  col_torp = "cornflowerblue",
  col_euth = "coral3",
  col_Mtnz = "black",
  ylab = "M",
  xlab = "Ta",
  xlim = NULL,
  ylim = NULL,
  legend = TRUE,
  pdf = FALSE
)

Arguments

tor_obj

a fitted model from tor_fit()

plot_type

A character string specifying the type of plot desired. Either "base" or "ggplot". Note that ggplots are still in development stage.

col_torp

color for torpor model prediction and points

col_euth

color for Euthermia model prediction and points

col_Mtnz

color of Mtnz

ylab

y label

xlab

x label

xlim

limit of the x-axis

ylim

limit of the y-axis

legend

A logical specifying if a legend should be added to the plot. Only work for base plot at the moment.

pdf

logical if a .pdf copy of the plot should be saved

Details

The function plots the predicted value as well as the raw data. Measures are presented in different colors depending on the metabolic state. Predicted values as well as 95% credible interval (segmented lines) are also presented. This function enables the user to replicate the analysis done in Fasel et al. (in prep). For more flexibility the users can use tor_fit() and tor_predict() directly.

Value

a graphics plot or a ggplot object


vullioud/torpor documentation built on Nov. 27, 2024, 2:28 a.m.