Commit 80b56f9
committed
Skip hidden offset text when positioning Axes titles
The y-axis offset text of an inner subplot that shares its y axis is
hidden but still carries text. _update_title_position only checked
get_text(), so since matplotlib#31285 (which makes a hidden text report a null,
non-finite tight bbox) the offset text pushed the title -- and the
subplot position computed by tight_layout -- to inf/NaN. Drawing then
raised "cannot convert float NaN to integer".
Only consider the offset text for title placement when it is visible.1 parent d421cec commit 80b56f9
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3261 | 3261 | | |
3262 | 3262 | | |
3263 | 3263 | | |
3264 | | - | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
3265 | 3270 | | |
3266 | 3271 | | |
3267 | 3272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8009 | 8009 | | |
8010 | 8010 | | |
8011 | 8011 | | |
| 8012 | + | |
| 8013 | + | |
| 8014 | + | |
| 8015 | + | |
| 8016 | + | |
| 8017 | + | |
| 8018 | + | |
| 8019 | + | |
| 8020 | + | |
| 8021 | + | |
| 8022 | + | |
| 8023 | + | |
| 8024 | + | |
| 8025 | + | |
| 8026 | + | |
| 8027 | + | |
8012 | 8028 | | |
8013 | 8029 | | |
8014 | 8030 | | |
| |||
0 commit comments