From 88429853b932471cfdfefd259855d6b8a23aa7c3 Mon Sep 17 00:00:00 2001 From: Richard Higgins Date: Fri, 16 Jun 2023 04:35:15 -0700 Subject: [PATCH] 1-line tutorial notebook plotting change to fix blank figure problem (#1549) Summary: Hi, Not sure this is the best fix. But while running this notebook, I only ever saw a blank canvas when trying to visualize the dolphin. It might be that I have a broken dependency, like plotly. I also don't know what the visualization is "supposed" to look like. But incase other people have this issue, this one line change solved the whole problem for me. Now I have a happy, rotatable dolphin. Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1549 Reviewed By: shapovalov Differential Revision: D46350930 Pulled By: bottler fbshipit-source-id: e19aa71eb05a93e2955262a2c90d1f0d09576228 --- docs/tutorials/deform_source_mesh_to_target_mesh.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb b/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb index a669267e6..ea96678f6 100644 --- a/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb +++ b/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb @@ -262,7 +262,7 @@ " points = sample_points_from_meshes(mesh, 5000)\n", " x, y, z = points.clone().detach().cpu().squeeze().unbind(1) \n", " fig = plt.figure(figsize=(5, 5))\n", - " ax = Axes3D(fig)\n", + " ax = fig.add_subplot(111, projection='3d')\n", " ax.scatter3D(x, z, -y)\n", " ax.set_xlabel('x')\n", " ax.set_ylabel('z')\n",