1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -04:00

Break out plotting to own crate egui_plot (#3282)

This replaces `egui::plot` with the new crate `egui_plot`
This commit is contained in:
Emil Ernerfeldt
2023-08-27 17:22:49 +02:00
committed by GitHub
parent 87f12d782e
commit 7b169ec13d
30 changed files with 134 additions and 57 deletions

View File

@@ -259,7 +259,7 @@ impl WidgetGallery {
}
fn example_plot(ui: &mut egui::Ui) -> egui::Response {
use egui::plot::{Line, PlotPoints};
use egui_plot::{Line, PlotPoints};
let n = 128;
let line_points: PlotPoints = (0..=n)
.map(|i| {
@@ -269,7 +269,7 @@ fn example_plot(ui: &mut egui::Ui) -> egui::Response {
})
.collect();
let line = Line::new(line_points);
egui::plot::Plot::new("example_plot")
egui_plot::Plot::new("example_plot")
.height(32.0)
.show_axes(false)
.data_aspect(1.0)