-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
add_shape, add_layout_image, add_annotation for multiple facets at once, add_hline and add_vline (+add_vrect/add_hrect) #2558
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
Closed
Closed
Changes from 3 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
1fb1888
row='all' col='all' working for add_shape
nicholas-esterer a84c8b8
Can also assign outer product of list indices
nicholas-esterer e96138b
range can now also get passed
nicholas-esterer af9c758
Trying to write some tests.
nicholas-esterer 33c0f30
Added methods to index all or a subset of the subplots
nicholas-esterer 0dea19c
Added tests for _get_subplot_coordinates and _indexing_combinations
nicholas-esterer 366f5ec
wrote tests for _select_subplot_coordinates and _indexing_combinations
nicholas-esterer 7fca7de
Merge branch 'issue-2140-b' into issue-2140
nicholas-esterer 3bb61c1
Removed abandoned old test code
nicholas-esterer 0d63119
Made add_trace recursive so it can address mulitple subplots
nicholas-esterer 08d56c0
BaseFigure.add_trace and _add_annotation_like accept lists now for ro…
nicholas-esterer 76e5d99
Documented row='all' or col='all'
nicholas-esterer 553a056
Documented new row and col syntax in add_trace
nicholas-esterer 571c890
Added _make_paper_spanning_shape
nicholas-esterer 70a5ce2
Added add_vline, add_hline, add_vrect, add_hrect
nicholas-esterer 40dea30
Fixed typo in docs
nicholas-esterer f472458
add_vline and the like work on single plots made without make_subplots
nicholas-esterer 35ba5a2
Added discussion of how to test vline, hline, etc.
nicholas-esterer 1d74ee7
rm pdb include, revert package-lock, add_vline etc. return self
nicholas-esterer be05c07
Shape is not added to subplot that contains no trace
nicholas-esterer c259f1a
Wrote hline etc. tests for subplots
nicholas-esterer 9236eae
Added hline etc. tests for empty subplots and single plot
nicholas-esterer caff20c
More descriptive error when row or col out-of-bounds
nicholas-esterer 87faec1
For custom-sized subplots, _add_annotation_like works with "all"
nicholas-esterer 776123c
Changed exclude_subplots_without_data to exclude_empty_subplots
nicholas-esterer 38ef1d1
Merge branch 'master' into issue-2140
nicholas-esterer 09eea88
vline etc. can be added to single plot now
nicholas-esterer 28f5212
Can't have multiple ** expansions in python 2 function calls
nicholas-esterer e942e68
Added domain to xref and yref validators
nicholas-esterer 040dd5b
Domain referenced shapes, images and annotations are working
nicholas-esterer 9dd6349
Use Plotly.js's domain referenced shapes for hline, vline etc.
nicholas-esterer cd01db0
Merge branch 'master' into issue-2140
nicholas-esterer f900521
Fixed some test_paper_span_shapes.py tests
nicholas-esterer f6c131a
BaseFigure._make_axis_spanning_shape works for single plots
nicholas-esterer 73455fa
paper span shapes tests are passing again
nicholas-esterer 197bc32
Added example with axis domain referencing shape
nicholas-esterer bf7581a
Trying to build my docs
nicholas-esterer 84a39d4
Adding documentation on domain referencing stuff
nicholas-esterer 4b58de0
Clarified when we're talking about axis data or axis domains
nicholas-esterer 229f65d
Described axis domain reference in figure structure docs
nicholas-esterer bf71c81
Added doc page for add_hline, add_vline, add_hrect, add_vrect
nicholas-esterer cd49147
Docs on addressing multiple facet rows and columns for adding shapes
nicholas-esterer e4b44c6
Put ' domain' in new shapes with domain reference
nicholas-esterer 3a52321
Starting to add annotation shape positions
nicholas-esterer f80e2a0
Position of annotation on lines and rects
nicholas-esterer 9d90f39
Annotations can be added to hline, vline, hrect, vrect
nicholas-esterer 8a62ba7
Skeleton of annotated shapes test
nicholas-esterer 3a440c8
Moved tests to test_autoshapes
nicholas-esterer ef5f6e8
Annotation tests for automatic shapes completed
nicholas-esterer 7f34a1b
Autoshapes documentation, don't add annotation if not specified
nicholas-esterer 5e67c43
codegen
nicholas-esterer 2379c54
If no annotations or shapes added in _process_multiple_axis_spanning_…
nicholas-esterer f2c9dfd
EnumeratedValidator now compatible with domain suffix
nicholas-esterer 80e213f
Sort JSON keys for tests in Python3.5
nicholas-esterer da3e452
Codegen off of plotly.js master
nicholas-esterer f0d4f34
add_hline, add_vline, add_hrect, add_vrect add to all subplots
nicholas-esterer 0ba4721
Arbitrary annotation position description word order
nicholas-esterer 31d68fd
Documented annotation_* kwargs for add_hline etc.
nicholas-esterer 4cfed3c
Removed accidentally added apidoc stuff
nicholas-esterer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,5 @@ temp-plot.html | |
doc/python/.ipynb_checkpoints | ||
doc/python/.mapbox_token | ||
doc/.ipynb_checkpoints | ||
|
||
tags |
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
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.
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.
Yes, this can be not-true, you can have really odd layouts: https://plotly.com/python/subplots/#multiple-custom-sized-subplots
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.
Hey so I checked this out and it turns out even in this case
grid_ref
is still a rectangle, just some of the entries are None. So we could still easily iterate through thegrid_ref
using something likeWe just check if it is not None before doing anything to it 🔧