Skip to content

Plotting extension library for CImGui.jl

License

Notifications You must be signed in to change notification settings

yamen/ImPlot.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImPlot.jl

Plotting extension library that can be used in conjunction with CImGui.jl to provide enhanced immediate-mode data visualization.

ImPlot.jl provides an interface to cimplot, which is an auto-generated C API to implot, a C++ plotting extension library for imgui.

Installation

]add https://github.com/wsphillips/ImPlot.jl

Example Usage

Use demo/demo.jl to check if things are working + the demo window that shows off what the API can do.

Plots are delcarative and follow a similar pattern as CImGui.jl:

## within a CImGui.jl render loop
## This assumes you have CImGui.LibCImGui.ImGuiCond_Once in scope
...

if show_window
    @c CImGui.Begin("Plot Window", &show_window)
    y = rand(1000)
    ImPlot.SetNextPlotLimits(0.0,1000,0.0,1.0, ImGuiCond_Once)
    if (ImPlot.BeginPlot("Foo", "x1", "y1", CImGui.ImVec2(-1,300)))
        ImPlot.PlotLine(y)
        ImPlot.EndPlot()
    end
    CImGui.End()
end

For some basic Julia imlementation examples, see also demo/example_plots.jl Another good place to look is the C++ demo sources

About

Plotting extension library for CImGui.jl

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 100.0%