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

Solution: Import the 'rc' module

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

from matplotlib import rc

 

For more information:
Python matplotlib rc