Git Product home page Git Product logo

implot_demos's People

Contributors

epezent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

implot_demos's Issues

glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE) compile error

implot_demos/common/App.cpp

Lines 171 to 186 in 86a565f

#if __APPLE__
// GL 3.2 + GLSL 150
const char* glsl_version = "#version 150";
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // Required on Mac
#else
// GL 3.0 + GLSL 130
const char* glsl_version = "#version 130";
glfwWindowHint(GLFW_SAMPLES, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
//glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
//glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // 3.0+ only
#endif

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.

Reference for future: fix Missing X11... and OPENSSL

  • ERROR
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Can be fixed by the following:

apt install libx11-dev
apt install libx11-dev

  • Error: SSL
 Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
  OPENSSL_INCLUDE_DIR)

sudo apt-get install libssl-dev

ImGui Version

Hello,

Which version of ImGui was it used in this project?

I am following the steps, provide in the README, to compile the project and I am getting some errors compiling ImGui.

COMPILATION STEPS

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

ERRORS:
image

Maybe we can update the compile steps forcing the clone of ImGui with the correct version.

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

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>();
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compile error in ubuntu23.04

/home/yun/Documents/cpp_img_demos/implot_demos/common/App.cpp: In constructor ‘App::App(std::string, int, int, int, const char**)’:
/home/yun/Documents/cpp_img_demos/implot_demos/common/App.cpp:152:5: error: ‘NvOptimusEnablement’ was not declared in this scope
  152 |     NvOptimusEnablement = AmdPowerXpressRequestHighPerformance = result["gpu"].as<bool>();
      |     ^~~~~~~~~~~~~~~~~~~
/home/yun/Documents/cpp_img_demos/implot_demos/common/App.cpp:152:27: error: ‘AmdPowerXpressRequestHighPerformance’ was not declared in this scope
  152 |     NvOptimusEnablement = AmdPowerXpressRequestHighPerformance = result["gpu"].as<bool>();
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/app.dir/build.make:76:CMakeFiles/app.dir/common/App.cpp.o] 错误 1
gmake[1]: *** [CMakeFiles/Makefile2:690:CMakeFiles/app.dir/all] 错误 2
gmake: *** [Makefile:136:all] 错误 2

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.

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

clang-cl error in 'json.hpp'

While compiling tests/benchmark.cpp using clang-cl (ver. 16.0.1), I'm facing this issue: ocornut/imgui#6386
Errors from clang-cl:

In file included from tests/benchmark.cpp:9:
./3rdparty\json.hpp(16773,25): error: variable 'end' with type 'auto *const' has incompatible initializer of type
      'std::_Array_iterator<char, 64>'
            auto* const end = std::remove(number_buffer.begin(),
                        ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./3rdparty\json.hpp(16783,25): error: variable 'dec_pos' with type 'auto *const' has incompatible initializer of type
      'std::_Array_iterator<char, 64>'
            auto* const dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point);
                        ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This has been fixed in: https://github.com/nlohmann/json/pull/3082/files. The gist of it was simply:

--- a/3rdparty/json.hpp 2022-08-12 10:02:19
+++ b/3rdparty/json.hpp 2023-05-22 08:42:20
@@ -16770,7 +16770,7 @@
         // erase thousands separator
         if (thousands_sep != '\0')
         {
-            auto* const end = std::remove(number_buffer.begin(),
+            const auto end = std::remove(number_buffer.begin(),
                                           number_buffer.begin() + len, thousands_sep);
             std::fill(end, number_buffer.end(), '\0');
             JSON_ASSERT((end - number_buffer.begin()) <= len);
@@ -16780,7 +16780,7 @@
         // convert decimal point to '.'
         if (decimal_point != '\0' && decimal_point != '.')
         {
-            auto* const dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point);
+            const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point);
             if (dec_pos != number_buffer.end())
             {
                 *dec_pos = '.';

So can 3rdparty/json.hpp please be updated for this error?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.