Some eyetrackers output its data with inversed values. E.g. Eyelink returns data with 0,0 in the left top corner, but visualisations make more sense with 0,0 being projeccted to the left bottom corner. So we neeed to "flip" the Y axis. But we also need to define the new "anchor". In our case, if we want the current 0,0 to become left top corner, we want to reanchor the "y" axis with 0 to be at current height (e.g. 1080).

flip_axis(obj, axis, anchor)

Arguments

axis

string of which axis to flip. c("x", "y")

anchor

what is the value of new 0? Needs to be deffined

Details

this function flips given axis (x or y) anchored to the anchor value.