plot_dataset | R Documentation |
Take a dataset and its analysis, together with plotting parameters, to visualize an IDOC experiment
plot_dataset(
experiment_folder,
dataset,
analysis,
result_folder = NULL,
plot_preference_index = TRUE,
plot_decision_zone = TRUE,
plot_crosses = TRUE,
subtitle = "",
colors = c(TREATMENT_A = "red", TREATMENT_B = "blue"),
labels = c(TREATMENT_A = "TREATMENT_A", TREATMENT_B = "TREATMENT_B"),
analysis_mask = NULL,
plot_mask = NULL,
downward = TRUE,
nrow = 1,
ncol = 20,
suffix = "",
cross_size = 2,
line_alpha = 1,
marker_shape = 16,
marker_colors = c("#35b347", "#00abee"),
do_mark_analysis_mask = TRUE,
do_document = TRUE,
orientation = "y",
style = "default",
...
)
experiment_folder |
Path to folder containing IDOC results .csv files |
dataset |
List of raw data including:
|
analysis |
List of processed data including:
|
result_folder |
Path to a folder where to save results. If not passaed, it is set to experiment_folder |
plot_preference_index |
Whether to show the scored preference index with the region id on the facet label (TRUE), or just the region id (FALSE) |
plot_decision_zone |
Whether to display the decision zone (TRUE) or not. |
plot_crosses |
Whether to display the decision zone crosses (TRUE) or not. |
subtitle |
Character to write on the plot subtitles |
colors |
Named vector of colors. Values should be colors and names need to map to controller events |
labels |
Character vector whose values become the name of the treatments as rendered in the plot's legend |
analysis_mask |
Numeric vector of length 2 containing start and end timepoint of mask in seconds since the start of the experiment Every behavior outside of the mask is ignored |
plot_mask |
If not NULL, the plot contains data contained within the interval's start and end (s) |
downward |
Whether the 0 should be at the top (TRUE) or the bottom (FALSE) of the plot |
nrow |
Number of rows used for facetting data |
ncol |
Number of cols used for facetting data |
suffix |
A character (word) that will differentiate resulting output from other output produced on the same experiment folder. Useful for segmenting the experiment into different periods of interest and analyzing these periods separately. |
cross_size |
Size of dots used to represent decision zone exits (crosses) |
line_alpha |
Alpha of position trace |
... |
Extra arguments for save_plot |
A corssing dataset where every record represents a decision zone exit of one animal is required to show the exits in the plot
ggplot2 object
mark_stimuli()
mark_decision_zone()
mark_crosses()
save_plot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.