Added data rotate function

Rotate the data to switch x- and y-axis