How to Solve NameError: name 'Poly3DCollection' is not defined -- mpl_toolkits

Solution: Import the 'Poly3DCollection' module

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

from mpl_toolkits.mplot3d.art3d import Poly3DCollection

 

For more information:
Python mpl_toolkits Poly3DCollection