Skip to content

Fix plot auto-bounds unset by default#3722

Merged
Wumpf merged 1 commit intomasterfrom
antoine/fix-auto-bounds
Dec 19, 2023
Merged

Fix plot auto-bounds unset by default#3722
Wumpf merged 1 commit intomasterfrom
antoine/fix-auto-bounds

Conversation

@abey79
Copy link
Copy Markdown
Collaborator

@abey79 abey79 commented Dec 19, 2023

These PR recently cleaned up the code around auto-bounds, but introduced an involuntary change whereby auto-bounds would not be enabled by default. All plots would default to being not properly centred as a result.

This PR changes the default back to enabled. It also deprecates auto_bounds_x() and auto_bounds_y(), which could only enable auto-bounds (which is not very useful as auto-bounds were, and now are again, enabled by default). A new auto_bounds() API can now be sued to disable auto-bounds if needed.

@abey79 abey79 added bug Something is broken egui_plot Related to egui_plot labels Dec 19, 2023
Copy link
Copy Markdown
Collaborator

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

nice! That's surprisingly straight-forward 😄

@Wumpf Wumpf merged commit add1695 into master Dec 19, 2023
@Wumpf Wumpf deleted the antoine/fix-auto-bounds branch December 19, 2023 16:59
emilk pushed a commit that referenced this pull request Jan 3, 2024
These PR recently cleaned up the code around auto-bounds, but introduced
an involuntary change whereby auto-bounds would not be enabled by
default. All plots would default to being not properly centred as a
result.

- #3587
- #3586

This PR changes the default back to enabled. It also deprecates
`auto_bounds_x()` and `auto_bounds_y()`, which could only enable
auto-bounds (which is not very useful as auto-bounds were, and now are
again, enabled by default). A new `auto_bounds()` API can now be sued to
disable auto-bounds if needed.

Fixes #3712 
Fixes rerun-io/rerun#4503
emilk added a commit that referenced this pull request Jan 3, 2024
## Changelog
* Fix plot auto-bounds default
[#3722](#3722) (thanks
[@abey79](https://github.com/abey79)!)

---------

Co-authored-by: Antoine Beyeler <49431240+abey79@users.noreply.github.com>
emilk added a commit to rerun-io/rerun that referenced this pull request Jan 3, 2024
### What
* Closes #4635
* See also emilk/egui#3763
* Includes this fix: emilk/egui#3722

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/4645/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4645/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/4645/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4645)
- [Docs
preview](https://rerun.io/preview/82415b7ed7cb1d02464d80766a7007a9ab8cca08/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/82415b7ed7cb1d02464d80766a7007a9ab8cca08/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
emilk added a commit to emilk/egui_plot that referenced this pull request Jul 15, 2024
## Changelog
* Fix plot auto-bounds default
[#3722](emilk/egui#3722) (thanks
[@abey79](https://github.com/abey79)!)

---------

Co-authored-by: Antoine Beyeler <49431240+abey79@users.noreply.github.com>
michalsustr pushed a commit to emilk/egui_plot that referenced this pull request Nov 26, 2025
## Changelog
* Fix plot auto-bounds default
[#3722](emilk/egui#3722) (thanks
[@abey79](https://github.com/abey79)!)

---------

Co-authored-by: Antoine Beyeler <49431240+abey79@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui_plot Related to egui_plot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

egui_plot auto-bounds broken Default plot bounds are broken

2 participants