ImPlot: 2D plots for Dear ImGui: lines, scatter, bars, shaded areas, heatmaps, histograms, pie charts, real-time data.
A plot lives between begin_plot() and end_plot(): the setup_* functions (axes, limits, legend) come first,
then the plot_* functions. Run the app with immapp.run(..., with_implot=True), which creates ImPlot’s context.
In Python, the data are numpy arrays. ImPlot’s functions are templated on one numeric type, so the arrays of one
call must share their dtype: convert them first (xs = xs.astype(ys.dtype)). Mismatched dtypes raise an error.
Upstream repository · The book’s page
Modules¶
In imgui_bundle (from imgui_bundle import implot):
implot: 125 functions, 8 classes, 36 enums · the C++ viewimplot.internal: 89 functions, 21 classes, 4 enums · the C++ view
Demos using it¶
The demos of the catalog that use it (the pictures link to their code and to the playground).

A parametric curve¶
Turn the knobs, or click Random: the curve follows at once.
More
At every frame, the GUI function draws the plot with ImPlot and the knobs with imgui-knobs, and reads their values right there. No callbacks, no widget objects: that is the immediate mode.
Uses: ImPlot, knobs

Assets and add-ons¶
Load images and icons from your assets folder, and use two add-ons: markdown and ImPlot.
More
A markdown editor with a live preview, and a pie chart whose values you can drag. Tick More info under each part to see how it is done. The add-ons are activated with immapp.AddOnsParams.
Uses: ImPlot

A tiny neural network learns two spirals¶
Can 16 neurons tell two spirals apart? Watch a tiny neural network learn, live, as in the TensorFlow Playground.
More
Then read how it works, formula by formula, next to its numpy code.
Uses: ImPlot

Simple harmonic motion¶
A mass on a spring, a pendulum, a vibrating string: they all follow the same equation.
More
It is the equation of simple harmonic motion (for the pendulum, at small angles). Adjust the mass and the spring stiffness, and watch how the motion changes.
Uses: ImPlot, knobs

Double pendulum¶
A double pendulum is a chaotic system: tiny changes in its initial conditions lead to wildly different trajectories.
More
Drag the angles to set initial positions, then release and watch chaos unfold.
Uses: ImPlot, knobs, toggles

Fourier epicycles¶
Any closed curve can be approximated by a sum of rotating circles (a Fourier series).
More
Adjust the number of circles to see how the approximation improves.
Uses: ImPlot, knobs, toggles

Logistic map¶
A very simple equation, and yet it can lead to wildly different behaviors, up to chaos.
More
The logistic map, x(n+1) = r * x(n) * (1 - x(n)), models for example the growth of a population with limited resources. Depending on r, it is stable, periodic (in 2-cycles, 4-cycles, etc), or chaotic. Let’s explore this.
Uses: ImPlot, toggles

Health and wealth of nations, 1800 to 2100¶
Each bubble is a country: income per person across, life expectancy up, population as the size, world region as the color.
More
Press Play and two centuries go by. Click a bubble to pin it and draw its path through time; pick other indicators for the axes.
Uses: ImPlot, spinners

Medical imaging: a chest CT, its windows, a segmentation¶
A real chest CT, explored as a radiologist would: its slices, its windows, and a region grown from a click.
More
Choose a window preset or drag its bounds on the histogram. Click a structure: the region grows across the slices, and the app measures it and shows it in 3D. A second tab finds the blood vessels of a retina. For research and teaching, not for diagnosis.
Uses: ImPlot, ImPlot3D, ImmVision, knobs, ImGuiKit, OpenCV

Gravitational lensing: a ring, arcs, the Einstein Cross¶
A mass in the foreground bends the light of a galaxy behind it.
More
The left sky shows the galaxy as it is, the right one what we see through the lens. Drag the galaxy (yellow) and the lens (blue), turn the knobs, or start from a preset: an Einstein ring, two images, a giant arc, the Einstein Cross. The thin lines are the critical curve, where the magnification diverges, and its map in the source plane, the caustic: as the galaxy crosses it, images are born or merge. Hover a pixel of the observed sky to see where its light comes from.
Uses: ImPlot, knobs, toggles

Power save when idle¶
When nothing happens, Hello ImGui lowers the frame rate to spare the CPU: after 3 seconds, the live plot and the spinner become choppy.
More
Content that changes on its own says so with hello_imgui.set_item_is_live(), and keeps the full speed while it is visible. The idling settings are global.
Uses: ImPlot, toggles, spinners

Markdown tour¶
Markdown rendered in an ImGui window: styled text, tables, code, images, math, diagrams, admonitions and more.
More
Each section shows its source, ready to copy. The page is a document: a table of contents, a search, headings that fold, and widgets between its renders (a live plot).
Uses: ImPlot

Markdown: a document with a table of contents and a search¶
Markdown as a document: a table of contents beside it, links between its sections, and a search (Ctrl+F).
More
Several renders and a section of widgets (a plot) share them, in one scroll area. The search also finds the text of the code blocks and of the collapsed sections. The headings fold.
Uses: ImPlot

Node editor: an image pipeline¶
An image flows through a graph of filters, and each node shows its result.
More
Change a parameter, and the nodes downstream follow at once. The patterns of imgui-node-editor for a real app: typed pins, links refused with a reason, a node created by dropping a link in empty space, menus, a group.
Uses: ImPlot, ImmVision, node editor, OpenCV

ImPlot: the interactive manual¶
Every kind of plot of ImPlot, section by section, with the code of each beside it.
More
Lines, scatter, bars, heatmaps, histograms, real-time plots and more, in Python and C++. From Dear ImGui Explorer, the interactive manual for Dear ImGui and its libraries.
Uses: ImPlot

Context managers (imgui_ctx)¶
In Python, with imgui_ctx.begin("Window"): replaces a begin() / end() pair, and the end() can no longer be forgotten.
More
The same exists for child windows, menus, popups, tables, tabs, fonts and styles, and for ImPlot with implot_ctx. Open a section to try it and read its code. See the Python tips.
Uses: ImPlot

A GUI beside a Jupyter notebook¶
At 60 or 120 frames per second, a live GUI beside your Jupyter notebook while the cells run.
More
In async mode (immapp.nb.start()), another cell keeps computing, as fast as it can, between the frames: stream data into a plot, or train a model and tune it while it learns. The page explains both modes; its video trains a neural network live, its learning rate on a slider.

Touch screens (phones, tablets)¶
The gestures of a phone in the browser: a swipe, a tap, a long press, a pinch, the keyboard.
More
On a mobile or a tablet, Hello ImGui turns a finger into what its user expects: a swipe scrolls, a tap clicks, a held finger opens a context menu, a pinch scales the app (its font) or zooms a plot or an image, two fingers pan, and a keyboard button appears next to a text field.
Uses: ImPlot, ImmVision, ImGuiKit



