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

Plot auto-bounds API improvement (part 1/2): clean-up #3587

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

abey79
Copy link
Collaborator

@abey79 abey79 commented Nov 20, 2023

Part 1 of 2 of adding a better API for egui_plot's auto-bounds feature.

In this PR:

  • change the Plot builder struct field to default_auto_bounds (was auto_bounds)
  • change the Plot state field to auto_bounds (was bounds_modified)
  • minor improvements to Vec2b

- the builder struct field is now `default_auto_bounds` (was `auto_bounds`
- the state fields are now `auto_bounds` (was `bounds_modified`)
@abey79 abey79 added the rerun Desired for Rerun.io label Nov 20, 2023
@abey79 abey79 changed the title Plot auto-bounds API improvement (part 1): clean-up Plot auto-bounds API improvement (part 1/2): clean-up Nov 20, 2023
@abey79 abey79 added the egui_plot Related to egui_plot label Nov 20, 2023
@Wumpf Wumpf self-requested a review November 20, 2023 14:00
Copy link
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.

lgtm!

@emilk emilk merged commit f20b7b4 into master Nov 21, 2023
36 of 37 checks passed
@emilk emilk deleted the antoine/plot-auto-bounds-api-part-1 branch November 21, 2023 10:22
Wumpf pushed a commit that referenced this pull request 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.

- #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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui_plot Related to egui_plot rerun Desired for Rerun.io
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants