Commit graph

44 commits

Author SHA1 Message Date
4bb4
06cc3061c1 Added support for linked axes. See comments.
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.
2021-05-30 11:56:14 +02:00
4bb4
ad80781f4d Added direct limit setting API for y limits 2021-04-19 12:37:31 +02:00
4bb4
5779f7e6d6 Automated the work from #16 2021-03-17 19:17:14 +01:00
4bb4
3c30e3f919 Fixed conversions 2021-03-14 20:53:07 +01:00
Ilya Averyanov
e53dd6a0dd Use same convention for size as in imgui-rs 2021-03-06 02:11:42 +03:00
4bb4
6179cf1f8d Locked imgui versions down more. See comments.
Due to the yanking of imgui-winit-support 0.6.1, builds that did
not have a lock file started failing in places. I've now locked
the versions of imgui and friends to exactly 0.6.0 to avert those
issues for the time being, with the longer-term fix being the
upgrade of all those to 0.7.0 in #13.
2021-02-06 10:02:58 +01:00
4bb4
21aa28591c Added stem plots and legend entry hover checking 2021-01-31 12:40:13 +01:00
4bb4
d11ea4a0f5 Bumped winit in wgpu demo 2021-01-13 21:33:47 +01:00
4bb4
ca0e273c9d Bumped Glium version in Glium demo 2021-01-13 21:24:57 +01:00
4bb4
092a1908fe Bumped cimplot/implot version, added "axis equal"
- This commit also fixes an issue with legend rotation and orientation
  always being set to values even if the user did not specify any.
  This broke the interactive configuration of where the legend should
  be.
2020-12-12 12:38:50 +01:00
4bb4
af760648b6 Added some simple colorscheme setters
These don't properly expose the implot style yet in a way that is
consistent with imgui-rs' handling of styles. This is to be added
later.
2020-11-29 19:21:12 +01:00
Benedikt Mandelkow
d02f25fb32 apply some automatic clippy hints 2020-11-29 12:49:26 +01:00
Benedikt Mandelkow
c5ec153488 update imgui 0.6 2020-11-29 12:49:26 +01:00
4bb4
6233ef3f45 Restructured example code 2020-11-22 15:55:48 +01:00
4bb4
4cd199071c Added heatmap support. See comments.
The basic functionality seems to work, though setting the drawing area
seems buggy. I'll have to investigate more.
2020-11-15 10:36:51 +01:00
4bb4
1643032c7a Added stairs plot support 2020-11-08 19:41:51 +01:00
4bb4
7c477ec551 Added plot <-> pixel coordinate conversions 2020-11-08 15:17:14 +01:00
4bb4
4645414624 Added legend location setting 2020-10-31 12:05:57 +01:00
4bb4
b6a7cae830 Brought WebGPU demo into same structure as Glium demo 2020-10-30 14:37:08 +01:00
4bb4
fa6412d20c Moved around some paths 2020-10-30 12:54:18 +01:00
4bb4
eab6d9a9d1 Added some comments, updated README with progress notes 2020-10-30 12:51:57 +01:00
4bb4
40f0cc8564 Reworked glium demo to use the shared example code 2020-10-30 12:42:14 +01:00
4bb4
8c623a7a79 Added an examples-shared crate to be used from the others 2020-10-30 12:24:08 +01:00
4bb4
3b702076cc Moved files around, have not adapted code yet though. 2020-10-30 12:11:27 +01:00
4bb4
0af4203d4f Added better Y axis handling and API coverage 2020-10-18 16:22:37 +02:00
4bb4
44a065c8c7 Changed some strings to be stored as ImString directly 2020-10-13 17:02:10 +02:00
4bb4
305c244373 Switched to released imgui-rs 0.5.0, adapted readme 2020-10-12 17:57:00 +02:00
4bb4
ea960bd30d Linked context into things, adapted examples. 2020-10-11 16:33:26 +02:00
4bb4
f85c50657b Initial work on move to implot 0.7 compatibility. See notes.
- This updates the bindings generator, the low-level bindings as
  well as the higher-level bindings and the examples to work
  with a newer master of cimplot that links to implot 0.7.
- Several things are not done properly yet:
  - Contexts can be created and as long as they are not dropped
    things work out (shown in the examples). However, this should
    be done more imgui-rs like, where operations that require a context
    make that explicit by requiring a context reference to be passed.
  - The README has not been updated yet to all the new features that
    were added.
2020-10-11 16:33:26 +02:00
4bb4
a8f91a65a7 Added colormap support 2020-09-27 20:21:30 +02:00
4bb4
8a171e9528 Refactored ticks setting code, still not great. 2020-09-20 21:21:19 +02:00
4bb4
ed02caed56 Got tick label setting to work, but inelegantly 2020-09-20 20:34:19 +02:00
4bb4
9814e86d64 Cleaned up examples code more. 2020-09-13 16:11:57 +02:00
4bb4
03f9fefba7 Added bar plot support 2020-09-13 16:09:21 +02:00
4bb4
ff96a07ef3 Added scatter plot support 2020-09-13 15:06:59 +02:00
4bb4
f05d681d25 Added a text plot example 2020-09-13 14:40:53 +02:00
4bb4
3d6e1ee938 Pinned imgui dependency to a fixed commit 2020-09-13 13:57:01 +02:00
4bb4
e847f23fb2 Refactored example and added to README. 2020-09-06 16:59:25 +02:00
4bb4
a257332f59 Added marker, stylevar and querying support 2020-08-30 11:01:28 +02:00
4bb4
a43a58d819 Added plot style colors and some misc utils. See comments.
- Also exposed the sys crate's ImPlotRange, ImPlotLimits and ImPlotPoint
  to the user as well as changing the limit-setting interface to using
  those. I'm not super sure about doing this yet though, because it is
  more verbose for no real reason to the user and for the purposes of
  the abstraction it may be better to add facade types anyway.

- There is no protection against calling things like `is_hovered` from
  outside a plot. Will need to think about how to make this impossible
  by design - we could for example pass an object to Plot's closure
  that has these methods, and that object is not created anywhere
  else.
2020-08-23 21:26:27 +02:00
4bb4
90f7dba1a7 Added text plot support 2020-08-23 20:31:28 +02:00
4bb4
84d10092be Added axis and plot flag support 2020-08-23 20:10:24 +02:00
4bb4
411086483e Added x and y limit setting API 2020-08-09 13:16:48 +02:00
4bb4
70eff2e3bf Updated readme, renamed example 2020-08-08 16:01:51 +02:00