No description
Find a file
2025-10-27 22:50:41 +09:00
examples fix: Compilation error 2025-10-07 23:55:54 +09:00
img added: many demos and images. 2023-10-03 22:18:54 +09:00
libs_hash updated: implot 2025-10-27 22:50:41 +09:00
src updated: implot 2025-10-27 22:50:41 +09:00
tests fixed: Compilation error on (Linux) Debian 12 Bookworm 2023-09-15 20:01:57 +09:00
tools Small changes 2023-12-20 13:05:54 +09:00
.gitignore updated: implot 2025-10-27 22:50:41 +09:00
.gitmodules removed: cimplot module 2025-09-05 19:00:56 +09:00
imgui.ini fix: Compilation error 2025-10-07 23:55:54 +09:00
implot.nimble updated: implot 2025-10-27 22:50:41 +09:00
LICENSE Uploaded files 2023-09-15 01:06:02 +09:00
Makefile fix: Compilation error 2025-10-07 23:55:54 +09:00
README.md updated: implot 2025-10-27 22:50:41 +09:00

Nim ImPlot binding


ImPlot is an immediate mode, GPU accelerated plotting library for Dear ImGui.

This project uses the modified generator that derived from the achievement of Nimgl/imgui.

Prerequisites


  • Windows11 or later
    MSys2/MinGW basic commands (make, rm, cp, strip ...)

    pacman -S make mingw-w64-ucrt-x86_64-{gcc,glfw}
    
  • Linux Debian13 Trixie (and Ubuntu families)

    sudo apt install make git gcc g++  
    sudo apt install lib{opengl-dev,gl1-mesa-dev,glfw3-dev,xcursor-dev,xinerama-dev,xi-dev} 
    
    • Install nim (If you'd like to install Nim compiler)

      curl https://nim-lang.org/choosenim/init.sh -sSf | sh
      

      You must now ensure that the Nimble bin dir is in your PATH.
      Place the following line in the ~/.profile or ~/.bashrc file.
      export PATH=/home/username/.nimble/bin:$PATH

Nimble install


nimble uninstall implot   # Remove old version if exists
nimble install implot

Running demo programs


git clone https://github.com/dinau/nim_implot
cd nim_implot
nimble test

Test source: examples/demo

Compiling application


It has to be used cpp backend at compilation for example,

pwd
nim_implot
cd examples/demo
nim cpp -r ImPlotDemo.nim 

Note: C backend is not supported.

Notice: Compilation options


If demo programs crash, please try to specify compilation option
--mm:refc instead of --mm:arc or --mm:orc,
especially if you use Nim-2.00, try to specify --mm:refc.
These are TODO at this moment.

Generating ImPlot bindings for development


pwd
nim_implot
nimble gen

Genarated file: src/implot.nim

My tools info


  • Windows11
    • Nim Compiler Version 2.2.4
    • gcc.exe 15.2.0
  • Debian 13
    • Nim Compiler Version 2.2.4
    • gcc 14.2.0

Now all demo (over 50) programs have been implemented in Nim language (2023/10),
(Orignal demo program is here implot_demo.cpp, (C++))
below images are part of them.

Plots


LinePlots.nim

alt

FilledLinePlots.nim

alt

ShadedPlots.nim

alt

ScatterPlots.nim

alt

RealTimePlots.nim

alt

StairstepPlots.nim

alt

BarGroups.nim

alt

BarPlots.nim

alt

BarStacks.nim

alt

ErrorBars.nim

alt

StemPlots.nim

alt

InfiniteLines.nim

alt

PieCharts.nim

alt

HeatMaps.nim

alt

Histogram.nim

alt

DigitalPlots.nim

alt

Images.nim

alt

MarkersAndText.nim

alt

NaNValues.nim

alt

Subplots


Tables.nim

alt

ItemSharing.nim

alt

Axes


LogScale.nim

alt

MultipleAxes.nim

alt

Tools


OffsetAndStride.nim

alt

DragRects.nim

alt

DragAndDrop.nim

alt

Custom


CustomDataAndGetters.nim

alt

Other ImGui / CImGui project


Language Project
Lua Script LuaJITImGui
NeLua Compiler NeLuaImGui, NeLuaImGui2
Nim Compiler ImGuin, Nimgl_test, Nim_implot
Python Script DearPyGui for 32bit WindowsOS Binary
Ruby Script igRuby_Examples
Zig, C lang. Compiler Dear_Bindings_Build
Zig Compiler ImGuinZ

SDL game tutorial Platfromer


ald

Language SDL Project
LuaJIT Script SDL2 LuaJIT-Platformer
Nelua Compiler SDL2 NeLua-Platformer
Nim Compiler SDL3 / SDL2 Nim-Platformer-sdl2/ Nim-Platformer-sdl3
Ruby Script SDL3 Ruby-Platformer
Zig Compiler SDL3 / SDL2 Zig-Platformer