* add plot legends
* don't show crosshairs when hovering over legend
* add a toggle for the legend
* changes based on review
* improve legend behavior when curves share names
This adds a new `zoom_delta` to input.
This is hooked up to ctrl-scroll on egui_web and egui_glium.
Browsers convert trackpad pinch gestures to ctrl-scroll,
so this means you can not pinch-to-zoom plots (on trackpad).
In the future we can support multitouch pinch-to-zoom via the same
`InputState::zoom_factor()` function
* 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
* * split plot into multiple files
* add curve from function
* move more functionality into ScreenTransform struct
* changes from code review in base branch
* let user specify a range for generated functions
* rename file
* minor changes
* improve generator functionality
* improve callback and add parametric callback
* minor changes
* add documentation
* fix merge issues
* changes based on review
* rename folder
* make plot.rs the mod.rs file
* remove mod.rs
* rename file
* namespace changes
* fix doctest
* Update egui/src/widgets/plot/items.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: ilya sheprut <optitel223@gmail.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* 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>