Skip to content

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

Merged
emilk merged 2 commits intomasterfrom
antoine/plot-auto-bounds-api-part-1
Nov 21, 2023
Merged

Plot auto-bounds API improvement (part 1/2): clean-up#3587
emilk merged 2 commits intomasterfrom
antoine/plot-auto-bounds-api-part-1

Conversation

@abey79
Copy link
Copy Markdown
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
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.

lgtm!

@emilk emilk merged commit f20b7b4 into master Nov 21, 2023
@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