Skip to content

fix: domain should not be reset when min/max are set#1638

Merged
martinRenou merged 2 commits intobqplot:0.12.xfrom
maartenbreddels:fix_domain_no_data_but_minmax_set
Jan 30, 2024
Merged

fix: domain should not be reset when min/max are set#1638
martinRenou merged 2 commits intobqplot:0.12.xfrom
maartenbreddels:fix_domain_no_data_but_minmax_set

Conversation

@maartenbreddels
Copy link
Copy Markdown
Member

In #1619 we reset the domain to (0, 1) when no data is present. However, this only matters when the min/max are not set.

Issue found in spacetelescope/jdaviz#2661

In bqplot#1619 we reset the domain to (0, 1) when no data is present.
However, this only matters when the min/max are not set.
@maartenbreddels maartenbreddels force-pushed the fix_domain_no_data_but_minmax_set branch from 81840a3 to 4e8ea9d Compare January 30, 2024 13:47
@maartenbreddels
Copy link
Copy Markdown
Member Author

pytest 8 seems to trigger the failure.

@martinRenou
Copy link
Copy Markdown
Member

Thanks! Would you be able to open the same in bqscales?

@martinRenou martinRenou merged commit 4d08e55 into bqplot:0.12.x Jan 30, 2024
@martinRenou martinRenou deleted the fix_domain_no_data_but_minmax_set branch January 30, 2024 15:36
martinRenou referenced this pull request Feb 19, 2024
* fix: set domain to (0, 1) when no data is present

Fixes #1614

If no data is present, a scale has a domain of (0, 1) but if we
remove the data (set it to an empty array) afterwards, we set it
to (-inf, +inf) which causes rendering issues and make the bqplot
figure unable to restore itself.
It is more consistent to behave like no data was passed in, and use
(0, 1) for the domain.

* Update snapshots

---------

Co-authored-by: martinRenou <martin.renou@gmail.com>
martinRenou added a commit to martinRenou/bqscales that referenced this pull request Dec 9, 2025
martinRenou added a commit to bqplot/bqscales that referenced this pull request Dec 9, 2025
* Port bqplot/bqplot#1638

* Update CI

* Update dev env

* Fix

* Some updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants