I'v made ImPlot library binding for Nim.
ImPlot is an immediate mode, GPU accelerated plotting library for Dear ImGui .
Running examples:
nimble install https://github.com/dinau/nim_implot
git clone --recursive https://github.com/dinau/nim_implot
cd nim_implot
nimble test
Some of examples:
Nice! Always great to see more plotting libraries! Do you intend to write a high level interface for it at some point?
And just out of curiosity, do you know what performance actually looks like when you plot large amounts of data? Does it handle that better than all standard scientific plotting libs (where that is not of importance usually)?
Signetures of Plot functions imported just have pointer arguments at this moment, for instance,
proc ipPlotLine*(label_id: cstring
, xs: ptr float32
, ys: ptr float32
, count: int
, flags: ImPlotLineFlags = 0.ImPlotLineFlags
, offset: int = 0
, stride: int = sizeof(float32)): void {.importc: "ImPlot_PlotLine_FloatPtrFloatPtr".}
so it has to be set the top address of an array to ptr float32 type argument. This could be worked around in the future.
Do you intend to write a high level interface for it at some point?
This library is just FFI library to ImPlot lib so I will not make high level interface.
Perfomance of large amount of data might not be high because ImPlot is based on ImGui .
Live demo is here please try it,
I don't know yet all functionality of ImPlot so far, if you have any questions it would be better ask to authour of ImPlot lib .
Live demo is here please try it,
Whereas the functions of ImPlot lib I've generated have those functionality using informaion of JSON files distributed by CImGui project.
Aah I see, you have more information that what is available in the C header files. That makes sense.
Whenever Futhark gets C++ support it might be easier to use that. But I wouldn't hold my breath.