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

Solution: Import the 'LinearLocator' module

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

from matplotlib.ticker import LinearLocator

 

For more information:
Python matplotlib LinearLocator