Skip to content
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

fix: set domain to (0, 1) when no data is present #1619

Merged
merged 2 commits into from Jul 26, 2023

Conversation

maartenbreddels
Copy link
Member

Fixes #1614

If no data is present, a scale has a domain of (0, 1) but if we remove the data afterwards (set it to an empty array) , 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.

Fixes bqplot#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.
@maartenbreddels
Copy link
Member Author

I hope i remembered the magic phrase correctly:

By the power vested in me by all code repositories, I call upon the almighty 'update galata references' phoenix. Arise from the ashes of the old screenshots and blaze a trail of new visuals across our Github sky!

@martinRenou
Copy link
Member

Looks like the phoenix burst into flames before it could try to fly.

I suspsect the galata bot will only work with the main branch from now on. I guess since it's now using JupyterLab 4 and the new galata.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@martinRenou martinRenou merged commit 1057c6b into bqplot:0.12.x Jul 26, 2023
9 checks passed
@martinRenou martinRenou deleted the fix_scale_domain_no_data branch July 26, 2023 08:05
@martinRenou
Copy link
Member

We need to upstream it to bqscales bqplot/bqscales#84

martinRenou added a commit to martinRenou/bqscales that referenced this pull request Jul 27, 2023
martinRenou added a commit to bqplot/bqscales that referenced this pull request Jul 27, 2023
martinRenou added a commit that referenced this pull request Jul 27, 2023
* 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

* Require bqscales recent

* Update Playwright Snapshots

---------

Co-authored-by: Maarten A. Breddels <maartenbreddels@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
maartenbreddels added a commit to maartenbreddels/bqplot that referenced this pull request Jan 30, 2024
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 added a commit to maartenbreddels/bqplot that referenced this pull request Jan 30, 2024
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.
martinRenou pushed a commit that referenced this pull request Jan 30, 2024
* fix: domain should not be reset when min/max are set

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.

* ci: pytest 8 make raises fail
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.

None yet

2 participants