Hi
I tried to make a 3d figure as shown in tutorial video but I’m getting an error. Following is my code
import matplotlib.pyplot as plt
fig=plt.figure()
axes=fig.gca(projection=‘3d’)
plt.show()
It’s showing following errors:
get_projection_class(projection)
57 try:
—> 58 return projection_registry.get_projection_class(projection)
59 except KeyError:
KeyError: ‘3d’
ValueError Traceback (most recent call last)
in
1 import matplotlib.pyplot as plt
2 fig=plt.figure()
----> 3 axes=fig.gca(projection=‘3d’)
4 plt.show()
1931 # no axes found, so create one which spans the figure
-> 1932 return self.add_subplot(1, 1, 1, **kwargs)
1933
1934 def sca(self, a):
ValueError: Unknown projection ‘3d’