Affine transform of an image
Prepending an affine transformation (Affine2D) to the data
transform of an image allows to manipulate the image's shape and
orientation. This is an example of the concept of transform chaining.
The image of the output should have its boundary match the dashed yellow rectangle.
import matplotlib.pyplot as plt
import numpy
