-
Notifications
You must be signed in to change notification settings - Fork 16
feat: DH-20808: Add subplot_titles and title parameters to make_subplots #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…_subplots Co-authored-by: jnumainville <[email protected]>
Co-authored-by: jnumainville <[email protected]>
Co-authored-by: jnumainville <[email protected]>
Co-authored-by: jnumainville <[email protected]>
…ncation logic Co-authored-by: jnumainville <[email protected]>
…title check Co-authored-by: jnumainville <[email protected]>
Co-authored-by: jnumainville <[email protected]>
- Rename use_existing_titles to titles_as_subtitles for clarity - Remove default value annotations from docstrings - Extract title handling logic into get_subplot_titles helper function - Move annotation and title application from unsafe_update_figure to atomic_layer - Add subplot_annotations and overall_title parameters to atomic_layer and layer - Update documentation to use simpler language (left to right, top to bottom instead of row-major) - Update all tests to use titles_as_subtitles - Simplify extract_title_from_figure to always return string Co-authored-by: jnumainville <[email protected]>
- Rename 'overall_title' parameter to 'title' in layer function - Remove unnecessary padding logic from get_subplot_titles (annotations are skipped for missing titles anyway) - Remove erroneous duplicate return statement in atomic_make_subplots Co-authored-by: jnumainville <[email protected]>
|
Looks like this needs deephaven/deephaven-core#7596 to pass fully |
|
ui docs preview (Available for 14 days) |
|
ui docs preview (Available for 14 days) |
|
plotly-express docs preview (Available for 14 days) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for subplot titles and an overall title to the make_subplots function in the Deephaven plotly-express plugin. The implementation allows users to specify individual subplot titles via a list or automatically extract titles from existing figures by setting subplot_titles=True. Additionally, users can now add an overall title to the entire subplot figure.
Changes:
- Added
subplot_titlesandtitleparameters tomake_subplotsfunction - Implemented helper functions for title extraction, annotation creation, and grid position mapping
- Updated documentation with examples of the new functionality
- Added comprehensive unit tests for the new features
- Updated test fixtures for precision handling in datetime comparisons
Reviewed changes
Copilot reviewed 22 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/plotly-express/src/deephaven/plot/express/plots/subplots.py | Core implementation of subplot titles and overall title functionality |
| plugins/plotly-express/src/deephaven/plot/express/plots/_layer.py | Added support for subplot annotations and title handling in layer function |
| plugins/plotly-express/test/deephaven/plot/express/plots/test_make_subplots.py | Added comprehensive test coverage for new subplot title features |
| plugins/plotly-express/docs/sub-plots.md | Updated documentation with examples of subplot titles and overall title usage |
| plugins/plotly-express/test/deephaven/plot/express/preprocess/*.py | Updated test assertions to use pandas.testing.assert_frame_equal for better precision handling |
| plugins/plotly-express/test/deephaven/plot/express/plots/test_timeline.py | Updated timeline test to handle datetime precision differences |
| tests/express.spec.ts | Added integration tests for titles and subplots |
| tests/app.d/express.py | Added test fixtures using the new functionality |
| sphinx_ext/sphinx-requirements.txt | Added Sphinx version constraint to prevent incompatibility |
| plugins/plotly-express/setup.cfg | Bumped deephaven-core dependency to 0.41.1 |
| plugins/plotly-express/docs/snapshots/*.json | Updated documentation snapshots |
| tests/express.spec.ts-snapshots/*.png | Added visual regression test snapshots |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
plugins/plotly-express/src/deephaven/plot/express/plots/subplots.py
Outdated
Show resolved
Hide resolved
|
plotly-express docs preview (Available for 14 days) |
|
ui docs preview (Available for 14 days) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 22 out of 28 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added subplot_titles argument to make_subplots that can either pass in a list of new subplot titles or be set to True to maintain existing subplot titles.
Added title argument to make_subplots as well, similar to other charts.