fix camera plot for new matplotlib

Summary: fixes https://github.com/facebookresearch/pytorch3d/issues/1554 , needed for Matplotlib 3.6+

Reviewed By: patricklabatut

Differential Revision: D46438822

fbshipit-source-id: f3c06ad5d8e881a635edd14f96d498dca73c169f
This commit is contained in:
Jeremy Reizenstein 2023-06-07 05:10:10 -07:00 committed by Facebook GitHub Bot
parent 35badc0892
commit 928efdd640

View File

@ -33,7 +33,7 @@ def plot_camera_scene(cameras, cameras_gt, status: str):
a string passed inside the `status` argument.
"""
fig = plt.figure()
ax = fig.gca(projection="3d")
ax = fig.add_subplot(projection="3d")
ax.clear()
ax.set_title(status)
handle_cam = plot_cameras(ax, cameras, color="#FF7D1E")