diff --git a/README.md b/README.md index ee6c715..7208a13 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # ImPlot -ImPlot is an immediate mode plotting widget for [Dear ImGui](https://github.com/ocornut/imgui). It aims to provide a first-class API that will make ImGui users feel right at home. ImPlot is well suited for visualizing program data in real-time and requires minimal code to integrate. Like ImGui, it does not use any C++11 features, headers, or STL containers, and has no external dependencies except for ImGui itself. +ImPlot is an immediate mode plotting widget for [Dear ImGui](https://github.com/ocornut/imgui). It aims to provide a first-class API that will make ImGui users feel right at home. ImPlot is well suited for visualizing program data in real-time and requires minimal code to integrate. Just like ImGui, it does not burden the end user with GUI state managment, avoids STL containers and C++ headers, and has no external dependencies except for ImGui itself. @@ -24,9 +24,9 @@ ImPlot is an immediate mode plotting widget for [Dear ImGui](https://github.com/ The API is used just like any other ImGui `Begin`/`End` function. First, start a plotting context with `BeginPlot()`. Next, plot as many items as you want with the provided API functions (e.g. `Plot()`, `PlotBar()`, `PlotErrorBars()`, etc). Finally, wrap things up with a call to `EndPlot()`. That's it! ```cpp -if (ImGui::BeginPlot("My Plot") { - ImGui::Plot("My Line Plot", xs ys, 1000); - ImGui::PlotBar("My Bar Plot", values, 20); +if (ImGui::BeginPlot("My Plot")) { + ImGui::Plot("My Line Plot", x_data y_data, 1000); + ImGui::PlotBar("My Bar Plot", values, 10); ... ImGui::EndPlot(); } @@ -42,14 +42,8 @@ Just add `implot.h`, `implot.cpp`, and optionally `implot_demo.cpp` to your sour - By default, no anti-aliasing is done on line plots for performance reasons. My apps use 4X MSAA, so I didn't see any reason to waste cycles on software AA. However, you can enable AA with the `ImPlotFlags_AntiAliased` flag. - If you plan to render several thousands lines or points, then you should consider enabling 32-bit indices by uncommenting `#define ImDrawIdx unsigned int` in your `imconfig.h` file, OR handling the `ImGuiBackendFlags_RendererHasVtxOffset` flag in your renderer (the official OpenGL3 renderer supports this). If you fail to do this, then you may at some point hit the maximum number of indices that can be rendered. -## Known Issues (Fix Me!) - -- Zooming to a range beyond the limits of `FLT_MAX` and `FLT_MIN` causes axes labels to disappear. - ## Gallery - -