Here are two scripts. Their function is identical. They take as input two vector files. The output is a new vector file. The set of vectors in one file is rotated and/or mirrored to align it with the set of vectors in the other file as well as possible.

script requires
procrustes Python
R with packages iL04 and vegan
procrustes2 Python with package NumPy

What is it for?

Below are two MDS maps, the result of two different measurements. The results look very different, and are hard to compare:

Rotate the second MDS result before making an MDS map. The maps are much more alike, and the true differences easier to see:

Hint: you can use map2rgb to extract the colors of an existing map.

Below is a cluster map and a corresponding MDS plot made with mdsplot

You can rotate the plot for a better alignment with the map. To do this, all you have to do is define the coofile in the configuration file for mdsplot, and define which of the two scripts you have. Here is the result: