plot_PPR_data_multiple_treatments()
creates a categorical scatter plot with
experimental state (i.e. grouped as baseline/before and after) and treatment
on the x-axis, and the paired-pulse ratio (PPR) on the y-axis. There are also
lines connecting the "before" data point to the "after" data point for each
letter. It is the same as plot_PPR_data_one_treatment()
but for more
than one treatment.
Usage
plot_PPR_data_multiple_treatments(
data,
include_all_treatments = "yes",
list_of_treatments = NULL,
plot_category = 2,
baseline_label = "B",
post_hormone_label = "A",
treatment_colour_theme,
theme_options,
filename_suffix = "",
save_plot_png = "no"
)
Arguments
- data
Paired pulse ratio data generated from
make_PPR_data()
.- include_all_treatments
A character ("yes" or "no") specifying if the plot will include data from all treatments. If "no", you must specify a list of treatments in
list_of_treatments
.- list_of_treatments
A list of character values describing the treatments that will be in the plot. Defaults to NULL, since include_all_treatments is "yes" by default.
- plot_category
A numeric value specifying the category, which can be used to differentiate different protocol types. In the sample dataset for this package,
plot_category == 2
represents experiments where insulin was applied continuously after a 5-minute baseline period.- baseline_label
A character value for the x-axis label applied to the pre-hormone state. Defaults to "Baseline".
- post_hormone_label
A character value for x-axis label applied to the post-hormone or post-protocol state. Defaults to "Post-hormone" but you will likely change this to the hormone or protocol name.
- treatment_colour_theme
A dataframe containing treatment names and their associated colours as hex values. See sample_treatment_names_and_colours for an example of what this dataframe should look like.
- theme_options
A dataframe containing theme options. See sample_theme_options for an example of what this dataframe should look like.
- filename_suffix
Optional character value to add a suffix to the filename of the .png file created with this plot. Could be useful if you have specified a custom list of treatments.
- save_plot_png
A character ("yes" or "no"). If "yes", the plot will be saved as a .png using ggsave. The filepath depends on the current type, but they will all go in subfolders below Figures/ in your project directory.
Value
A ggplot object. If save_plot_png is defined as "yes", it will also
generate a .png file in the folder Figures/Evoked-currents/PPR
relative
to the project directory.
See also
plot_PPR_data_one_treatment()
to plot changes in PPR for a single treatment.