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
Hi there,
that's a good question. I believe a similar question was asked some time ago in the following thread: https://forum.cogsci.nl/discussion/4738/remapping-trajectories-to-both-sides-sorta#latest
I provided some demo code there to solve it. I think it should be applicable to your case. Feel free to follow up here if you have further questions when adapting it to your purpose.
Best,
Pascal
Thank you, Pascal! This is very helpful :)