mirror of
https://github.com/gwm17/implot.git
synced 2024-11-22 18:28:53 -05:00
Update README.md
This commit is contained in:
parent
aebf4f66e9
commit
c027445766
14
README.md
14
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.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/zoom_pan.gif" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/controls.gif" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/dnd.gif" width="285">
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/line_plot.png" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/scatter_plot.png" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/bar_plot.png" width="285">
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/log_plot.png" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/error_bars.png" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/markers.png" width="285">
|
||||
|
|
Loading…
Reference in New Issue
Block a user