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

add set_plot_bounds method, giving users the ability to set the plot bounds themselves. #2320

Merged
merged 2 commits into from
Nov 22, 2022

Conversation

flxzt
Copy link
Contributor

@flxzt flxzt commented Nov 18, 2022

This PR adds the method set_plot_bounds() to give users more control over the bounds of the plot. Some requested this in discussion #1328 . To use this, the user needs to be able to create PlotBounds structs so I added a PlotBounds::new() method as well.
To give an example for usecases: implementing a digital oscilloscope or a serial plotter where you have fixed ranges controlled from other parts in or outside of the app.
This is sort of continuing #2145, which added the ability to translate the plot bounds by a delta.

I am not sure about adding this to the changelog? Let me know if I should add it, or if it is trivial and not worth mentioning.

Also: thank you for creating egui!

@flxzt flxzt changed the title add set_plot_bounds method to give users the ability to set the plot bounds themselves. add set_plot_bounds method, giving users the ability to set the plot bounds themselves. Nov 18, 2022
@emilk emilk merged commit f363353 into emilk:master Nov 22, 2022
emilk added a commit that referenced this pull request Dec 2, 2022
…bounds themselves. (#2320)

* add set_plot_bounds method

* call it from_min_max for consistency with Rect

Co-authored-by: Emil Ernerfeldt <[email protected]>
@flxzt flxzt deleted the add_set_plot_bounds branch December 4, 2022 17:31
JohannesProgrammiert pushed a commit to JohannesProgrammiert/egui that referenced this pull request Jan 21, 2023
…bounds themselves. (emilk#2320)

* add set_plot_bounds method

* call it from_min_max for consistency with Rect

Co-authored-by: Emil Ernerfeldt <[email protected]>
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