Rotating x,y points 45 degrees I have a two dimensional data set that I would like to rotate 45 degrees such that a 45 degree line from the points (0,0 and 10,10) becomes the x-axis. For example, the x,y points (1,1), (2,2), and (3,3) would be transformed to the points (0,1), (0,2), and (0,3), respectively, such that they now lie on the x-axis. The points (1,0), (2,0), and (3,0) would be rotated to the points  (1,1), (2,2), and (3,3). How can I calculate how to rotate a series of x,y point 45 degrees?

The transformation you describe by examples is not a rotation, in fact it does not preserve norms, it is the projection on the real axis. If instead you want a $45°$-counterclockwise rotation, apply the rotation matrix
$$\left(
\begin{array}{cc}
\cos\theta&-\sin\theta\\
\sin\theta&\cos\theta
\end{array}
\right)$$
with $\theta=\frac{\pi}{4}$
