Repository navigation
feat: PointCloud.disp(notebook=True) draws in the notebook cell with Plotly - #279
Merged
Merged
Conversation
…Plotly Plotly is optional: without it, notebook=True raises an ImportError that says how to install it. The figure is built with get_plotly_fig and shown once, because open3d's draw_plotly shows the figure and also returns it, which puts two views in a cell that ends with the call. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 6 |
| Duplication | 2 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a notebook,
PointCloud.disp()opens an external Open3D window. Withnotebook=Trueit now draws in the output of the cell, as a Plotly figure that can be rotated and zoomed. This matches Swift'slaunch(notebook=True). The default isFalse, so scripts and the external window behave as before.Plotly is optional and is not added as a dependency. Without it,
notebook=Trueraises anImportErrorthat sayspip install plotly. The view optionsfront,lookat,upandzoom, andwidth,heightandpoint_sample_factor, are passed to Open3D.file=withnotebook=TrueraisesValueError.The figure is built with
get_plotly_figand shown once.open3d.visualization.draw_plotlyshows the figure and also returns it, so a cell that ends with that call shows two live views.VoxelGrid.disp()is not changed. Open3D's Plotly drawing gives an empty figure for a voxel grid.Tests: shown once with no return value, the points, title and size,
point_sample_factor, the missing-Plotly message, and thefile=error. I ran a one-cell notebook headless, and it gave one figure in the cell output. I ran the full suite and mypy, and both are clean. I did not look at the figure in VS Code.AI-assisted: written with Claude Code.
🤖 Generated with Claude Code