Repository navigation
Fix row and column titles in make_subplots when edge cells are spanned - #5793
Open
joaopedroassad wants to merge 1 commit into
Open
joaopedroassad wants to merge 1 commit into
joaopedroassad wants to merge 1 commit into
Conversation
joaopedroassad
force-pushed
the
fix-subplot-titles-spans
branch
from
October 6, 2026 03:18
843b8e1 to
bc7ae12
Compare
This branch has not been deployed
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.
Link to issue
Closes #5792
Description of change
make_subplotsnow keeps every row and column title aligned with its own row/column when the edge cell it is anchored to is empty or covered by a subplot withrowspan/colspan. Before, that cell was skipped, which pushed the remaining titles onto the wrong rows/columns and dropped the last one.Demo
Before:
[('Row A', 0.212)](Row A next to row 2, Row B missing)After:
[('Row A', 0.787), ('Row B', 0.212)]Testing strategy
Added
test_row_and_column_titles_with_spanning_subplots, parametrized over three layouts (colspan covering the last cell of a row, rowspan in the last column, and a rowspan withstart_cell="bottom-left"that leaves a top-row cell empty). It checks that the title positions match the same grid without spans. It fails on main and passes with this change. The existing subplot tests still pass, and regular grids (padding, uneven widths/heights, shared axes, secondary_y) produce exactly the same annotations as before.Additional information (optional)
When the cell does hold a subplot that covers exactly that row/column, its own domain is still used, so
l/r/t/bpadding behaves as it did before. Only empty or spanned cells fall back to the grid cell geometry.Guidelines