Modified code for plotting courtship/aggression data