W1D3 Error in tutorial 4 plot code

Hi everyone,

I didn’t change any thing in the code and facing a problem in the first code block of section 1 in tutorial 4 lies in this line:
ax = plt.subplot(projection=‘3d’)
the ‘3d’ attribute is not accepted I don’t know why, If anyone had the same problem and fixed it please help.

Thanks In advance

Hi everybody,

I searched for my problem and it seemed like versions incompatibility, so I need to add extra lib that works for multiple versions, it was fixed by adding this line to in the imports block

from mpl_toolkits.mplot3d import Axes3D

If anyone having the same problem try it, if it didn’t work, try also this one

from mpl_toolkits import mplot3d

Good Luck :wink:

1 Like