plot_behavior: Plot the behavior of a CRN.

View source: R/io.R

plot_behaviorR Documentation

Plot the behavior of a CRN.

Description

This function plots the behavior returned by react().

Usage

plot_behavior(behavior, species = NULL, x_label = "Time",
  y_label = "Concentration", legend_name = "Species",
  geom_list = list("line"), save_file_name = NULL, show_legend = TRUE,
  show_x_label_name = TRUE, show_y_label_name = TRUE, y_origin_0 = FALSE,
  variable_line_type = FALSE)

Arguments

behavior

Behavior returned by react()

species

The vector with the species that should be plotted. If no one is specified, than all of them are plotted.

x_label, y_label

Label name of the x and y axis, respectively. The default are 'Time' and 'Concentration'.

legend_name

Name of the legend. The default is 'Species'.

geom_list

A list specifying what geoms from ggplot2 to use for the plot. The default value is a list with just line on it. The currently possible values are line and point.

save_file_name

Name file that the plot should be saved in. Currently files with .pdf and .png were tested but it should support any extension supported by ggsave(). If no file name is specified, the won't be saved.

show_legend

Show legend in the plot, Default value is TRUE.

show_x_label_name

Show label name of x axis. Default value is TRUE.

show_y_label_name

Show label name of y axis. Default value is TRUE.

y_origin_0

Set the origin of y axis to 0. Default value is FALSE.

variable_line_type

If TRUE, the line type will change for each species. This is usefull when multiple species has the same behavior.

Value

The object returned by ggplot(), so you can modify the plot or save it in a different way.


DanielKneipp/DNAr documentation built on Jan. 7, 2023, 12:42 p.m.