Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

remapping trajectories based on a data condition

Hello,


I'm writing to see if it's possible to remap time-normalized trajectories in different directions based on a data condition in Mousetrap. Currently I have a graph that looks like this (with all aggregated trajectories being remapped to the left):

But I would like to split them up based on target gender to look more like this (with aggregated trajectories of female targets going to the right and aggregated trajectories of male targets going to the left):


My current (brute force) workaround is that I subsetted my mousetrap data based on target gender using the mt_subset function, remapped each subset individually (see below), visualized them separately, and then frankensteined this "combined" plot in powerpoint, but I was hoping that someone who is more knowledgeable about Mousetrap might know of a more elegant (and reproducible) solution. Thank you in advance for any advice!


mt_remapped_male <- mt_remap_symmetric(

 mt_aligned_male,

 use = "tn_trajectories",

 dimensions = c("xpos", "ypos"),

 remap_xpos = "left",

 remap_ypos = "up")


mt_remapped_female <- mt_remap_symmetric(

 mt_aligned_female,

 use = "tn_trajectories",

 dimensions = c("xpos", "ypos"),

 remap_xpos = "right",

 remap_ypos = "up")

Comments

Sign In or Register to comment.