I am trying to graph the measurement of a physical object. The problem is that the data is that the data represents the object at an angle.
This is what the measurement looks like when viewed from the side.
I need to rotate the data for the coloring to be accurate. The data is a 2d matrix in numpy.
I need to detect the angle and axis needed to rotate the matrix to make it as flat as possible, and apply the rotation.