Git Product home page Git Product logo

Comments (4)

pijyoi avatar pijyoi commented on June 23, 2024

A comment in another issue (#2257) mentions that fill levels are not supported while enableExperimental is False, but I observe the opposite.

The comment in question:
enableExperimental=False (indeed, fill level is not implemented in this codepath)

What was meant: that it was a good thing that enableExperimental was set to False, because fill level was not implemented for useOpenGL=True and enableExperimental=True

Also, why does fill level support depend on enableExperimental, but FillBetweenItem objects are able to display whether enableExperimental is true or false?

useOpenGL=True causes Qt to use OpenGL as a rendering backend for the QGraphics system. This is supposed to work transparently and no other changes are needed for pyqtgraph library code.

In addition, enableExperimental=True causes pg.PlotCurveItem to switch to drawing lines using native OpenGL commands.
pg.PlotCurveItem is the only GraphicsObject that is affected by enableExperimental=True.

How fill level is implemented:
When fill level is enabled, the pyqtgraph library joins the ends of the plot curve together such that there is an enclosed polygon. It then requests the Qt library to flood fill the enclosed polygon.
FillBetweenItem is implemented in the same way.
As long as only Qt painting commands are used, it works whether or not OpenGL is used as a rendering backend.

Expected behavior
The curve with fillLevel set should be filled while enableExperimental = True.

When enableExperimental=True, native OpenGL commands are used for pg.PlotCurveItem and no flood-filling functionality is implemented.

from pyqtgraph.

dmax366 avatar dmax366 commented on June 23, 2024

Thank you for the clarification @pijyoi. Apologies for misreading your comment.
So if we need to fill curves while useOpenGL and enableExperimental are true, is FillBetweenItems with a "fill level" curve the recommended workaround?

from pyqtgraph.

pijyoi avatar pijyoi commented on June 23, 2024

So if we need to fill curves while useOpenGL and enableExperimental are true, is FillBetweenItems with a "fill level" curve the recommended workaround?

Well, my recommendation is to not use the native OpenGL painting mode of pg.PlotCurveItem. i.e. don't use useOpenGL=True and enableExperimental=True.

Personally, I don't use enableOpenGL=True at all, the library performance is good enough as is for my use.

from pyqtgraph.

dmax366 avatar dmax366 commented on June 23, 2024

Understood. Thank you for taking the time to respond.
After some further testing, I've concluded that my application works best with useOpenGL = False and that enableExperimental doesn't noticeably impact UI responsiveness. At least for my use case.
It was more beneficial to put in the option to turn off curve fill to improve UI responsiveness when the curve contains a lot of points.

from pyqtgraph.

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.