extrinsic2pyramid
extrinsic2pyramid copied to clipboard
TypeError: FigureBase.gca() got an unexpected keyword argument 'projection'
Seeing following error:
matplotlib==3.7.2
matplotlib-inline==0.1.6
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[2], line 3
1 from util.camera_pose_visualizer import CameraPoseVisualizer
----> 3 visualizer = CameraPoseVisualizer([-50, 50], [-50, 50], [0, 100])
File /workspace/notebooks/capture-notebooks/old_notebooks/khayam/extrinsic2pyramid/util/camera_pose_visualizer.py:10, in CameraPoseVisualizer.__init__(self, xlim, ylim, zlim)
8 def __init__(self, xlim, ylim, zlim):
9 self.fig = plt.figure(figsize=(18, 7))
---> 10 self.ax = self.fig.gca(projection='3d')
11 self.ax.set_aspect("auto")
12 self.ax.set_xlim(xlim)
TypeError: FigureBase.gca() got an unexpected keyword argument 'projection'
<Figure size 1800x700 with 0 Axes>
i got the same error
Change the line as follows:
self.ax = self.fig.add_subplot(projection='3d')