Comments (4)
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.
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.
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.
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)
- ConsoleWidget.write() function missing HOT 6
- TypeError exception in ROI raiseContextMenu . QPoint being sent floats instead of ints HOT 14
- ParameterTree Example Generated Deprecation Warning HOT 1
- Test failure on test_PolyLineROI on arm64
- parameterTree contents are not displayed on the correct position when the parameterTree widget has scroll bars HOT 4
- GraphicsScene.mouseMoveEvent duplicates events
- Export to SVG with opacity on items
- Error when using FFT on data with one point HOT 1
- FillBetweenItems overflows the area between the target curves HOT 3
- Dynamically wrapped composed methods have no type hints HOT 5
- `PlotItem.scene()` has a `QGraphicsScene` type hint instead of a `pyqtgraph.GraphicsScene` HOT 1
- Increasing Legend text generate a vertical misalignment with the sample.
- examples/MultiDataPlot.py is broken
- Tiny bars in real time plot histogram HOT 1
- ROI functionality in image() doesn't work when axes are flipped
- Segfault when iterating on a transform-mapped Vector in a thread HOT 8
- PlotItem with a custom ViewBox HOT 4
- Layout issues with ParameterTree (Plot Speed Test example)
- Message printing to a console widget not working properly
- ParameterTree bug with list since pyqtgraph-0.13.4 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyqtgraph.