bias_triangle_plot#

bias_triangle_plot(df: DataFrame, hue: str = None, ax: Axes = None, trajectory: bool = False, palette=None, legend: bool = True, corners: bool = True) → Axes[source]#

Side and alternation bias in a triangle: a point per row of df (from metrics.choices.get_bias_evolution_df), e.g. one per mouse, per session or per group of trials. The corners are always left, always right and always alternating; a mouse that chooses at random is in the circle (it alternates half of the time, and repeats to each side a quarter).

Parameters:
  • df – left_right_bias (x: the fraction of right minus left repetitions, -1 to 1) and alternating_bias (y: the fraction of alternations, 0 to 1) of each group. With n_trials, the “full” style writes it next to each point.

  • hue – as in win_stay_lose_switch_plot.

  • trajectory – as in win_stay_lose_switch_plot.

  • palette – as in win_stay_lose_switch_plot.

  • legend – as in win_stay_lose_switch_plot.

  • corners – name the corners (in the “publication” style they are not).