Commit 88429853 authored by Richard Higgins's avatar Richard Higgins Committed by Facebook GitHub Bot
Browse files

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
parent 009a3d3b
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
" points = sample_points_from_meshes(mesh, 5000)\n", " points = sample_points_from_meshes(mesh, 5000)\n",
" x, y, z = points.clone().detach().cpu().squeeze().unbind(1) \n", " x, y, z = points.clone().detach().cpu().squeeze().unbind(1) \n",
" fig = plt.figure(figsize=(5, 5))\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.scatter3D(x, z, -y)\n",
" ax.set_xlabel('x')\n", " ax.set_xlabel('x')\n",
" ax.set_ylabel('z')\n", " ax.set_ylabel('z')\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment