This repository contains toy ImPlot applications that demonstrate some of the library's functionality

ImPlot Demos

This repository contains toy ImPlot applications that demonstrate some of the library's functionality. The demos here are more sophisticated than those provided in implot_demo.h, and may rely on third-party libraries that would otherwise clutter ImPlot's main repository. Use these examples as a starting point for your application and to familiarize yourself with ImPlot, but do not assume all code (e.g. signal processing algorithms) to be perfectly correct or optimal.

Requirements

  • OpenGL
  • C++17 compiler

Build Instructions

  1. Clone this repository, ImPlot, and ImGui into a parent directory (name doesn't matter):
mkdir root
cd root
git clone https://github.com/epezent/implot_demos
git clone https://github.com/epezent/implot
git clone https://github.com/ocornut/imgui
  • root/
    • imgui/
    • implot/
    • implot_demos/
  1. Build with CMake, e.g.:
cd implot_demos
mkdir build
cd build
cmake ..
cmake --build . --config Release

Demos

Demo Description
demo.cpp Main demo. Displays the ImPlot (and ImGui) library supplied demo windows.
filter.cpp Simple filter toy for educational purposes. Displays time domain input/output signals, and the frequency domain transfer function, amplitude spectrum, etc.
spectrogram.cpp Realtime audio spectrogram and visualizer with device playback. Pass in an audio file at the command line: ./spectrogram.exe ./aphex_twin_formula.wav (see resources/audio folder).

Contributing

Have you created something awesome with ImPlot? If so, please consider submitting a PR with a minimal working example of your application as a demo. Use the following guidelines:

  • Modify your ImPlot/ImGui code so that it subclasses common/App.h (see any existing demos).
  • Try to contain your demo to a single file located in demos/.
  • Indicate your authorship and any helpful documentation at the top of your demo source file.
  • Add dependencies with CMake FetchContent (preferred), git submodules, or manually to the 3rdparty/ folder (include the license).
  • If your demo requires resources (audio, images, etc.), add them to the resources/ folder. Keep it simple!
  • Screenshots and/or GIFs with your PR are helpful.
Comments
  • How to plot scrolling spectrogram efficiently ?

    How to plot scrolling spectrogram efficiently ?

    I am using ImPlot to plot the spectrogram of audio recorded from microphone in real-time and it works fine. It is based on the demo in this repo.

    What would be the most efficient way to have the plot scroll in real-time with new data entering from the right ?

    I tried using ImPlotHeatmapFlags_ColMajor so as to have the spectrogram bins in consecutive memory in C/C++ with the idea of doing some movement of elements in the array. But I was unable to get ImPlotHeatmapFlags_ColMajor to work correctly. I only changed the order of data in the array and enabled the flag with no other change.

    BTW thanks for developing the awesome ImPlot library

  • Does not build with latest ImGui (v1.84)

    Does not build with latest ImGui (v1.84)

    ImGui v1.84 removed there gl3w code, because it is now embeded. ... also, having to have imgui and implot be in the directory above is kinda bad, imho.

  • glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE) compile error

    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE) compile error

    https://github.com/epezent/implot_demos/blob/86a565f56ab3f85cf42ba29ba092e65151e6ee3f/common/App.cpp#L171-L186

    For line 177, error message: no known conversion from 'const gl::GLboolean' (aka 'const glbinding::Boolean8') to 'int' for 2nd argument

    Replacing GL_TRUE with GLFW_TRUE will make it compile.

  • Track Particular Plot

    Track Particular Plot

    Hi, Is there a way to keep track of specific plots, so if I have stocks going on, and I'd like to keep latest candle in middle of screen (tracked) how can I do something like ImPlotTrack and passone the plot name maybe so it keeps focus on it? Not sure how something similar can be achieved. Thanks

  • Changes so it compiles on Ubuntu 20.04

    Changes so it compiles on Ubuntu 20.04

    Made changes according to the suggestions in https://github.com/epezent/implot_demos/issues/5#

    Tested the changed files in both Win10 and Ubuntu 20.04. Both compiled successfully without errors. Also tested on MacOS (10.15) and compilation was succesful.

  • NvOptimusEnablement build error

    NvOptimusEnablement build error

    Just tried to build with today's git head of imgui/implot/implot_demos with gcc 10.3.0 and see:

    [ 92%] Building CXX object CMakeFiles/app.dir/common/Fonts/RobotoItalic.cpp.o
    /usr/src/local/implot_demos/common/App.cpp: In constructor ‘App::App(std::string, int, int, int, const char**)’:
    /usr/src/local/implot_demos/common/App.cpp:152:5: error: ‘NvOptimusEnablement’ was not declared in this scope
      152 |     NvOptimusEnablement = AmdPowerXpressRequestHighPerformance = result["gpu"].as<bool>();
          |     ^~~~~~~~~~~~~~~~~~~
    /usr/src/local/implot_demos/common/App.cpp:152:27: error: ‘AmdPowerXpressRequestHighPerformance’ was not declared in this scope
      152 |     NvOptimusEnablement = AmdPowerXpressRequestHighPerformance = result["gpu"].as<bool>();
          |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • Real-time stocks example

    Real-time stocks example

    Hi!

    I would like to make an example "stocks" running in real time. Do you have any idea how this could be done? I'm interested in top down ideas.

    As far as I understand we can get data from yahoo finance all the time if we access it every few seconds. We also need to think about how to redraw the candlesticks each time. Also we need some kind of storage, otherwise all data might not fit in.

    In general, I would be glad to get any ideas for an example and articles, based on which I could make the example realtime.

Some source code to demonstrate avoiding certain direct syscall detections by locating and JMPing to a legitimate syscall instruction within NTDLL.

hiding-your-syscalls What is this? This repository contains all of the source code from my blog post about avoiding direct syscall detections, which y

Nov 1, 2022
The repository contains some examples of pre-trained SNN (Spiking Neural Network) models.

About the Project The repository contains some examples of pre-trained SNN (Spiking Neural Network) models. The models were trained using the MM-BP tr

Nov 24, 2022
A simple PoC to demonstrate that is possible to write Non writable memory and execute Non executable memory on Windows

WindowsPermsPoC A simple PoC to demonstrate that is possible to write Non writable memory and execute Non executable memory on Windows You can build i

Jul 21, 2022
Demonstrate ability to read memfd_secret() data from the kernel

nosecmem This project demonstrates the newly-added memfd_secret Linux system call, and a kernel module which can dump the contents of these so-called

Oct 3, 2022
C#-like properties for C++20. This was made to demonstrate a bug in ClangFormat.

cpp20-property C#-like properties for C++20. Example usage #include <iostream> #include <Propery.hpp> class ProperyTest { public: zsl::Property<

Jun 9, 2022
This repository is for everyone for Hacktoberfest 2021. Anyone can contribute anything for your Swags (T- Shirt), must be relevant that can add some value to this repository.
This repository is for everyone for Hacktoberfest 2021. Anyone can contribute anything for your Swags (T- Shirt), must be relevant that can add some value to this repository.

Hacktober Fest 2021 For Everyone! Upload Projects or Different Types of Programs in any Language Use this project to make your first contribution to a

Nov 27, 2022
This project contains information on the PC-Link hardware interface for some early 2000 Sony HiFi decks
This project contains information on the PC-Link hardware interface for some early 2000 Sony HiFi decks

pclink-i2c This project contains information on the PC-Link hardware interface for some early 2000 Sony HiFi decks, such as the CMT-DC500MD (also know

Jan 21, 2022
Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.
Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

Apr 5, 2022
Hydrogen is a tiny GDI Malware, with some bytebeat music, many payloads and some shaders
Hydrogen is a tiny GDI Malware, with some bytebeat music, many payloads and some shaders

Hydrogen is a tiny GDI Malware, with some bytebeat music, many payloads and some shaders

Nov 12, 2022
Toy LLVM obfuscator pass
Toy LLVM obfuscator pass

ToyObfuscator Some simple obfuscator ;) (base on llvm-10) Compile Build out-tree pass git clone https://github.com/veritas501/ToyObfuscator.git cd Toy

Nov 6, 2022
Toy 8 bit CPU with a real assembler

neko8 neko8 is a 8 bit CPU emulator designed to be easy to learn written in C. It uses its own simple architecture and can be programmed in its own fo

Jan 4, 2022
nn - a toy operating system, designed for fun

nn is a toy operating system, designed for fun (and from a position of general naïveté). i'm not sure how far it'll go, but one thing's for sure: it'll probably implement nearly nothing.

Jan 28, 2022
Eve programming Language. Toy project.
Eve programming Language.  Toy project.

Eve Programming Language How to use Eve Install & Run $ sudo make install $ eve <filename>.eve Version check $ eve -v Clean $ sudo make clean Hell

Jun 28, 2022
Special Apps Remover (U.S.A Android Phones) (ADB ONLY) Supports deleting the applications of some American companies
Special Apps Remover (U.S.A Android Phones) (ADB ONLY) Supports deleting the applications of some American companies

Special Apps Remover (U.S.A Android Phones) (ADB ONLY) Supports deleting the applications of some American companies

Apr 28, 2022
Learn how to connect your Flexispot (LoctekMotion) desk to the internet. This repository contains a collection of scripts to get your started, combined with research and instructions.
Learn how to connect your Flexispot (LoctekMotion) desk to the internet. This repository contains a collection of scripts to get your started, combined with research and instructions.

(image source: Windows Central) Turn your LoctekMotion/FlexiSpot desk into a smart desk Recently I acquired a new standing desk from FlexiSpot. During

Nov 21, 2022
This repository contains the source for the ANARI API SDK

ANARI-SDK This repository contains the source for the ANARI API SDK. This includes: Front-end library API utilties and helpers (mostly for implementat

Nov 20, 2022
This repository contains the tools we used in our research on the Google Titan M chip

Titan M tools In this repository, we publish the tools we used in our research on the Google Titan M chip. We presented our results at Black Hat EU 21

Nov 14, 2022
This repository contains the source-code for the Robothon 24h series of workshops and competition within ENSTA Borj Cedria.

Robothon: The 24h long zero to hero robotics bootcamp What is Robothon? Robothon by Electronix ENSTABC is a 24h long event held within the walls of EN

Mar 23, 2022
Repository contains 1372 group lab works

Осенний курс по дисциплине "Программирование" 2021 Правила работы с репозиторием Для начала работы каждый студент делает форк (fork) репозитория на св

Mar 26, 2022