View source: R/animal_layer_point_ggplot_func.R
| animal_layer_point_ggplot_func | R Documentation |
Create a dot plot ggplot object layer on a base canvas plot. This function makes a dot plot by calculating the average value for each animal based on the cellular level, so it shows the average wave for each animal. Note: this function is wrapped inside the final superplot function.
animal_layer_point_ggplot_func(
ggplot_obj,
dataset,
xaxe = "Animal",
my_grouping_vars = c("Animal_No", "Animal", "Condition", "Treatment", "Experiment"),
colored_by = "animal_type",
yaxe,
jitter_width = 3.5,
animal_size = 2,
animal_alpha = 0.4
)
ggplot_obj |
A ggplot object. the base canvas plot which you want to add the layer to. |
dataset |
A dataframe object. The dataset for analysis, eg wave kinetics or wave occurrence df. |
xaxe |
A string. The variable you want to compare with. Default to |
my_grouping_vars |
Character vector. A character vector of groups names assigned to perform the cell aggregation. Don't change at least you know what you are doing! |
colored_by |
A string. The criteria to assigning color to the dots. Options possibles are by |
yaxe |
A string. The variable name of interest to plot. |
jitter_width |
A double. Value assigned to the jitter width. Default to |
animal_size |
A double. Value assigned to the size of the dots. Default to |
animal_alpha |
A double. Value assigned to the transparency of the dots. Default to |
A ggplot object with a dotplot additional layer of individual Animal datapoints.
# the example is missing
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.