Choices by side and difficulty#
Left choices for each correct side and difficulty (when there is no stimulus value to plot against).

from matplotlib import pyplot as plt
from lecilab_behavior_analysis.metrics.trial_events import (
side_and_difficulty_to_numeric,
transform_side_choice_to_numeric,
)
from lecilab_behavior_analysis.plots import choice_by_difficulty_plot
df = day[day["task"] != "Habituation"].copy()
df["first_choice_numeric"] = df["first_choice"].apply(transform_side_choice_to_numeric)
df["side_difficulty"] = df.apply(side_and_difficulty_to_numeric, axis=1)
fig, ax = plt.subplots(figsize=(4, 3.5))
choice_by_difficulty_plot(df, ax=ax)
trials, day, summary, events and cohort are the inputs of the examples. Back to the gallery