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

Solution: Import the 'Path' module

# Add the following line to the top of your code
from matplotlib.path import Path

 

For more information:
matplotlib Path