How to Solve NameError: name 'Transform' is not defined -- matplotlib

Solution: Import the 'Transform' module

To Solve the error, add the following line to the top of your code.

from matplotlib.transforms import Transform

 

For more information:
Python matplotlib Transform