Giter Club home page Giter Club logo

Comments (8)

wsphillips avatar wsphillips commented on July 4, 2024 1

The visible points will offset according to the plot limits. You're only displaying about 1000-2000 points in those screenshots. In the demo, each X-axis point has a delta of 0.01, so the truncation becomes visible when the X-axis range spans any range wider than ~16. You can modify X limits with click and drag or mousewheel while hovering the X-axis. Panning back and forth with more than 16k point range makes the truncation obvious.

image

from cimgui.jl.

Gnimuc avatar Gnimuc commented on July 4, 2024 1

When _VtxCurrentIdx passes 16k, it should be reset to 0 and add a new drawing command. It looks like implot does nothing about this.

from cimgui.jl.

Gnimuc avatar Gnimuc commented on July 4, 2024 1

Should be fixed by epezent/implot#41.

from cimgui.jl.

wsphillips avatar wsphillips commented on July 4, 2024 1

The fix is now merged into implot (with a number of other optimizations). There was also a commit merged to imgui master that addresses the same issue (although I don't think it's entirely mandatory since (in my hands) local C++ builds using v1.76 imgui + latest implot can render high vertex plots without the culling). In either case, it looks like v1.77 imgui is nearing, so when that happens we should be good to go. Closing this issue since it appears to have been solved upstream.

from cimgui.jl.

Gnimuc avatar Gnimuc commented on July 4, 2024

I got a sinusoidal noisy wave. How could I know the number of points plotted?

Screen Shot 2020-05-23 at 11 16 59

Oops! Never mind. I just found the way to get the number, but it works normally on my machine:

Screen Shot 2020-05-23 at 11 20 21

from cimgui.jl.

Gnimuc avatar Gnimuc commented on July 4, 2024

Issue raised because (supposedly) this is fixed within imgui itself (from discussion above):

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.

I'm pretty sure this has been fixed in #12. However, I only tested it on macOS, so there might be something wrong on other platforms.

from cimgui.jl.

wsphillips avatar wsphillips commented on July 4, 2024

For line plots, the argument can be made that displaying data ranges more than 1-2X your monitor's horizontal resolution is a waste (I plan to work around this for now by downsampling data). However, this might be a pain for other types of plots or more complex generic rendering in the future.

If it's not truly fixed by the backend implementation, the easiest alternative might be to include the macro/pre-processor definition mentioned in the readme when building (perhaps when we make the move to v1.76).

from cimgui.jl.

Gnimuc avatar Gnimuc commented on July 4, 2024

The macro definition method is not recommended in ocornut/imgui#2591:

If you've been using 32-bits indices, I would appreciate if you try to revert back to 16-bit indices and use this feature (need to update your renderer).

The back-end implementation is ported from imgui's opengl3 implementation, it should work correctly(e.g. https://github.com/inkydragon/Jui.jl/blob/Fractal-demo/test/LargeMeshTest.jl#L52).

I didn't read the implot source code, but I guess the problem is likely due to it doesn't handle VtxOffset correctly when doing the line plot.

from cimgui.jl.

Related Issues (20)

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.