2020-10-30 11:24:08 +00:00
|
|
|
pub mod bar_plots;
|
2020-11-15 09:36:51 +00:00
|
|
|
pub mod heatmaps;
|
2020-10-30 11:24:08 +00:00
|
|
|
pub mod line_plots;
|
|
|
|
pub mod scatter_plots;
|
2020-11-08 18:41:51 +00:00
|
|
|
pub mod stairs_plots;
|
2021-01-31 11:40:13 +00:00
|
|
|
mod stem_plots;
|
2020-10-30 11:24:08 +00:00
|
|
|
pub mod text_plots;
|
2020-10-30 11:42:14 +00:00
|
|
|
|
2020-11-22 14:55:48 +00:00
|
|
|
use imgui::{im_str, Condition, Ui, Window};
|
2020-10-30 11:42:14 +00:00
|
|
|
use implot::PlotUi;
|
|
|
|
|
|
|
|
pub fn show_demos(ui: &Ui, plot_ui: &PlotUi) {
|
2020-11-22 14:55:48 +00:00
|
|
|
Window::new(im_str!("implot-rs demo"))
|
|
|
|
.size([430.0, 450.0], Condition::FirstUseEver)
|
|
|
|
.build(ui, || {
|
|
|
|
ui.text(im_str!("Hello from implot-rs!"));
|
|
|
|
ui.text_wrapped(im_str!(
|
|
|
|
"The headers here demo the plotting features of the library.\
|
|
|
|
Have a look at the example source code to see how they are implemented.\n\
|
|
|
|
Check out the demo from ImPlot itself first for instructions on how to\
|
|
|
|
interact with ImPlot plots."
|
|
|
|
));
|
|
|
|
|
|
|
|
ui.separator();
|
|
|
|
ui.text(im_str!("Bar plots:"));
|
|
|
|
bar_plots::show_demo_headers(ui, plot_ui);
|
|
|
|
|
|
|
|
ui.separator();
|
|
|
|
ui.text(im_str!("Line plots:"));
|
|
|
|
line_plots::show_demo_headers(ui, plot_ui);
|
|
|
|
|
|
|
|
ui.separator();
|
|
|
|
ui.text(im_str!("Scatter plots:"));
|
|
|
|
scatter_plots::show_demo_headers(ui, plot_ui);
|
|
|
|
|
|
|
|
ui.separator();
|
|
|
|
ui.text(im_str!("Text plots:"));
|
|
|
|
text_plots::show_demo_headers(ui, plot_ui);
|
|
|
|
|
|
|
|
ui.separator();
|
|
|
|
ui.text(im_str!("Stairs plots:"));
|
|
|
|
stairs_plots::show_demo_headers(ui, plot_ui);
|
|
|
|
|
|
|
|
ui.separator();
|
|
|
|
ui.text(im_str!("Heatmaps:"));
|
|
|
|
heatmaps::show_demo_headers(ui, plot_ui);
|
2021-01-31 11:40:13 +00:00
|
|
|
|
|
|
|
ui.separator();
|
|
|
|
ui.text(im_str!("Stem plots:"));
|
|
|
|
stem_plots::show_demo_headers(ui, plot_ui);
|
2020-11-22 14:55:48 +00:00
|
|
|
});
|
2020-10-30 11:42:14 +00:00
|
|
|
}
|