06cc3061c1
This commit adds support for linked axes between plots. One can specify such linked limits using the new `linked_x_axis()` function (and the variants for the Y axes) by specifying an `Rc<RefCell<ImPlotRange>>` value, and passing clones of the same `Rc` to other plots. The values within those `Rc` need to be kept persistent between frames, hence the way to use this functionality is to keep a clone of the `Rc` outside the frame-drawing function as part of the application state. The regular limit setting API is unaffected. |
||
---|---|---|
.. | ||
examples-shared | ||
implot-glium-demo | ||
implot-wgpu-demo | ||
README.md |
Examples
This folder contains examples that demonstrate how to use the Rust bindings. Things are structured as follows:
- examples-shared is a library crate that contains the actual usage examples. It is used in the backend-specific crates.
- implot-glium-demo is an example for using
implot-rs
in conjunction with a Glium backend. - implot-wgpu-demo is an example for using
implot-rs
in conjunction with a WebGPU backend
If you want to just copy-paste code to start with, copy examples-shared
along with
your favourite backend example crate. The glium backend code is largely taken from imgui-rs.