Skip to content

fix: subplots_height bug#12

Open
rochamorro1 wants to merge 1 commit intomainfrom
fix/subplot_height_division_by_zero
Open

fix: subplots_height bug#12
rochamorro1 wants to merge 1 commit intomainfrom
fix/subplot_height_division_by_zero

Conversation

@rochamorro1
Copy link
Copy Markdown
Collaborator

Easy fix to subplots_heigh = 0 bug

@rochamorro1 rochamorro1 added the bug Something isn't working label Jan 13, 2026
@rochamorro1 rochamorro1 linked an issue Jan 13, 2026 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a 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 PR fixes a division-by-zero bug in the grid_dims function that occurs when subplot_height equals 0 (which happens when coeff_vars is empty or when unit is 0).

Changes:

  • Added a guard condition to prevent division by zero by setting subplot_height = 1 when it equals 0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/plot/utils.py
Comment thread src/plot/utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Handle subplot_height = 0

2 participants