🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.tcl
Article #99

ANNOUNCE: implot.Tk 1.0 – ImPlot and ImPlot3D bindings for Tcl/Tk 9

#99
From: Nicolas ROBERT
Date: Sun, 25 Oct 2026 13:50
65 lines
3120 bytes
I'm pleased to announce implot.Tk 1.0, Tcl/Tk bindings for
ImPlot and ImPlot3D: fast, interactive 2D/3D plots rendered with OpenGL
in a Tk widget.

Quick Intro:
Unlike Tk, which uses a traditional "retained mode", Dear ImGui (the core and its ecosystem) 
operates in "immediate mode". This means the UI is entirely redrawn 
at every frame.

Implot.Tk features:
- ImPlot 1.0: lines, scatter, bars, shaded, stairs, stems, error bars,
  heatmaps, histograms, pie charts, digital plots, subplots, tables...
- ImPlot3D 0.4: 3D lines, scatter, surfaces, meshes...
- Dear ImGui 1.92 widgets (sliders, checkboxes, combos...) next to the plots.
- Interactive: zoom, pan, drag tools, annotations, plot queries.
- Several surfaces in the same application, rendered on demand.
- Windows, Linux and macOS (universal).

Requirements: 
- Tcl/Tk 9.0
- Tcl cffi 2.0
- TkGL
- A set of C shared libraries.

Ready-to-use packages (including the C library and TkGL) are available
on the GitHub Releases page.

Quick example:
package require implot.tk

# 1. Creates the surface (no Tk widget yet) and sets its options.
set f [implottk::surface new]
$f SetOptions -width 600 -height 400 -title "Line" -axisName {x y}

# 2. Adds the commands, evaluated at each frame.
$f AddPlotCmd {
    implottk::static {
        set xs [implottk::doubleToPointer {0 1 2 3 4}]
        set ys [implottk::doubleToPointer {0 1 0.5 4 1}]
    }
    implot::PlotLine_doublePtrdoublePtr "Line 1" $xs $ys 5 {LineColor {x 1 y 0 z 0 w 1}}
}

# 3. Render creates the Tk widget and returns its path, 4. pack it.
pack [$f Render] -fill both -expand 1

I started this project several years ago, and it's always been 
highly important to me.

Source, demos and downloads:
https://github.com/nico-robert/implot.tk

Nicolas

Feel free to look around these cross-functional projects. 
At the core of this ecosystem is Dear ImGui, all the other projects 
build upon it to provide high-performance 2D and 3D plotting capabilities:
- https://github.com/epezent/implot
- https://github.com/brenocq/implot3d
- https://github.com/ocornut/imgui

The C Libraries:
- https://github.com/cimgui/cimgui
- https://github.com/cimgui/cimplot
- https://github.com/cimgui/cimplot3d
Technical Details
Message-ID: <1792936220-10104@newsgrouper.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
From: Nicolas ROBERT <user10104@newsgrouper.org.invalid>
Newsgroups: comp.lang.tcl
Subject: ANNOUNCE: implot.Tk 1.0 – ImPlot and ImPlot3D bindings for Tcl/Tk 9
Date: Sun, 25 Oct 2026 13:50:20 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <1792936220-10104@newsgrouper.org>
Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user10104
Injection-Date: Sun, 25 Oct 2026 13:50:20 GMT
User-Agent: Newsgrouper/0.9.0