mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Drag and zoom support for plots (#317)
* drag and zoom support for plots * update doctest * use impl ToString * revert back to Into<String> until #302 is solved * Apply suggestions from code review Co-authored-by: ilya sheprut <optitel223@gmail.com> * use persistence feature for PlotMemory * rename shift -> translate * remove automatic bounds * removed unused methods * Into<String> -> ToString * Apply suggestions from code review Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * avoid potential invalid bounds bug * use new is_valid method * improve auto bounds behavior as suggested * use NOTHING to initialize min_auto_bounds Co-authored-by: ilya sheprut <optitel223@gmail.com> Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
committed by
GitHub
parent
cb14e8571f
commit
012542d066
@@ -139,7 +139,7 @@ impl super::View for PlotDemo {
|
||||
self.time += ui.input().unstable_dt.at_most(1.0 / 30.0) as f64;
|
||||
};
|
||||
|
||||
let mut plot = Plot::default()
|
||||
let mut plot = Plot::new("Demo Plot")
|
||||
.curve(self.circle())
|
||||
.curve(self.sin())
|
||||
.curve(self.thingy())
|
||||
|
||||
Reference in New Issue
Block a user