Plot Proportion of Looks Over Time for Interest Areas (IAs)
Description
This function creates a time-course plot of the proportion of looks to specified Interest Areas (IAs). Optionally, it can facet the plot by an experimental condition. Custom labels for each IA can be specified through the ‘ia_mapping’ argument to define the display order.
Usage
plot_IA_proportions(
data,
ia_column,
time_column,
proportion_column,
condition_column = NULL,
ia_mapping,
use_color = TRUE
)
Arguments
data
|
A data frame containing the data to plot. |
ia_column
|
The name of the column containing Interest Area (IA) identifiers. |
time_column
|
The name of the column representing time (e.g., milliseconds). |
proportion_column
|
The name of the column with the proportion of looks for each IA. |
condition_column
|
Optional. The name of the column representing experimental conditions. If not provided, the plot will not be faceted by condition. |
ia_mapping
|
A named list specifying custom labels for each IA in the desired display order (e.g., ‘list(IA1 = "Target", IA2 = "Cohort", IA3 = "Rhyme", IA4 = "Unrelated")’). |
use_color
|
Logical. If ‘TRUE’ (default), the plot will use colors to differentiate Interest Areas. If ‘FALSE’, different line types, shapes, and line widths will be used instead. |
Value
A ggplot2 plot of the proportion of looks over time for each IA, optionally faceted by condition.