pyqtgraph/examples
lidstrom83 3af23725ca
Scatter Plot Improvements (#1420)
* Added hovering demo to ScatterPlot example

* Use Qt's serialization for SymbolAtlas.symbolMap keys

Yields significant performance improvements when updating the scatter plot's options. See e.g. the plot hover example.

* Further optimized scatter plot picking

* Fix ScatterPlot example tool tip

* Clean up while I'm here

* Compatibility

* Some simple optimizations for ScatterPlotItem

Speedups for ScatterPlotSpeedTest.py:
~50% without pxMode
~ 0% pxMode with useCache
~30% pxMode without useCache

* ~3x speedup in scatter plot speed test with pxMode

* More optimization low-hanging fruit for the scatter plot

* Removed hover example to lazily pass tests

* Avoid segfault

* Re-add hover example to ScatterPlot.py

* Switch to id-based keying for scatter plot symbol atlas

- Use cases exist where serialization-based keying is a significant bottleneck, e.g. updating without atlas invalidation when a large variety pens or brushes are present.
- To avoid a performance hit, the onus is on the user to carefully reuse pen and brush objects.

* Optimized caching in scatter plot hovering example

* Fixed and optimized scatter plot hovering example

* Minor scatter plot optimization

* Cleanup

* Store hovered points in a set for the hovering example

* Keep a limited number symbol atlas entries around for future reuse

* Added a docstring note to remind the user to reuse QPen and QBrush objects for better performance

* Tidied up hovering example

* Typo

* Avoid unnecessary atlas rebuilds

* Refactored SymbolAtlas

* Efficient appending to SymbolAtlas

* SymbolAtlas rewrite

* Cleanup and profiling

* Add randomized brushes to speed test

* Add loc indexer to ScatterPlotItem

* Profile ScatterPlotItem.paint to identify bottlenecks

* Reuse targetRect to improve paint performance

* Readability improvements (opinionated)

* Only need to set x and y of targetRect

- w and h can stay set to 0 (not entirely sure why)
- this is a bit faster than setting all of x, y, w, h

* Minor renaming

* Strip off API changes and leave to another PR

* Renaming

* Compatibility

* Use drawPixmap(x, y, pm, sx, sy, sw, sh) signature to avoid needing to update QRectFs

* Use different drawing approaches for each Qt binding for performance reasons

* Fix a bug introduced two commits ago

Incidentally, I think there is a similar bug in the main branch currently.

* Minor performance and readability improvements

* Strip out source and target QRectF stuff

* Bring source and target QRectF stuff back in a less coupled way

* Leave deprecating getSpotOpts for another PR

* Compatibility fix

* Added docstrings and use SymbolAtlas__len__ where possible

* Fix export issue

* Add missing import

* Add deprecation warnings

* Avoid using deprecated methods

* Fix and cleanup max spot size measurements

* Make creation of style opts entries explicit

* Add hovering API to ScatterPlotItem

* Compatibility

* Marshal pen and brush lists in setPen and setBrush

* Fixed platform dependent bug
2020-12-16 11:07:39 -08:00
..
cx_freeze Added cx_freeze example (thanks Jerry!) 2014-06-06 15:53:17 -06:00
optics workaround pyside bug #671 2018-05-23 21:12:16 -07:00
py2exe Fix: avoid importing py3 module from pyqt when using py2 2014-04-03 13:33:16 -04:00
relativity Fix QString handling 2018-06-22 17:31:58 -07:00
verlet_chain Fix verlet integration demo 2017-10-18 00:18:46 -07:00
__init__.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
__main__.py Fix ExampleApp: Use pg module from directory when run without installation (#1432) 2020-11-09 14:57:01 -08:00
Arrow.py Implement headWidth parameter for arrows (#385) 2020-06-09 22:04:29 -07:00
BarGraphItem.py Added BarGraphItem.shape() to allow better mouse interaction 2014-02-09 10:38:29 -05:00
beeswarm.py merged many changes from acq4 2013-03-26 13:46:26 -04:00
CLIexample.py python3 fixes 2013-02-24 23:09:03 -05:00
ColorButton.py python3 fixes 2013-02-24 23:09:03 -05:00
ConsoleWidget.py python3 fixes 2013-02-24 23:09:03 -05:00
contextMenu.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
crosshair.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
customGraphicsItem.py python3 fixes 2013-02-24 23:09:03 -05:00
CustomGraphItem.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
customPlot.py Fix TickSliderItem: Avoid ghost ticks | Improved customPlot.py code (#1459) 2020-11-26 22:28:03 -08:00
DataSlicing.py Added pg.gaussianFilter, removed all dependency on gaussian_filter 2014-03-11 19:01:34 -04:00
DataTreeWidget.py Cleanup, better support for tracebacks in DataTreeWidget 2014-09-25 15:21:28 -04:00
DateAxisItem_QtDesigner.py Date axis item (#1154) 2020-04-27 11:43:22 -07:00
DateAxisItem_QtDesigner.ui Date axis item (#1154) 2020-04-27 11:43:22 -07:00
DateAxisItem.py Date axis item (#1154) 2020-04-27 11:43:22 -07:00
designerExample_pyside2.py Fix up Qt.py and deprecate USE_XX variables 2018-02-16 20:42:34 -08:00
designerExample.py Added Qt.loadUiType function for PySide 2013-12-17 21:23:37 -05:00
designerExample.ui Patch/window handling (#468) 2020-06-01 11:23:18 -07:00
DiffTreeWidget.py Added DiffTreeWidget 2014-09-25 17:26:06 -04:00
dockarea.py minor cleanups 2014-05-08 09:50:26 -04:00
Draw.py python3 fixes 2013-02-24 23:09:03 -05:00
ErrorBarItem.py Add ErrorBarItem.setData 2014-06-27 10:55:55 -04:00
ExampleApp.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate_pyqt5.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate_pyqt.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate_pyside2.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate_pyside.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate.ui example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
FillBetweenItem.py Fix some bugs in PyQt5 2015-01-17 00:21:33 +08:00
Flowchart.py Clean up examples / docs 2016-08-31 15:14:25 -07:00
FlowchartCustomNode.py Fix opt name for SpinBox: range -> bounds. 2016-04-11 21:05:21 -07:00
fractal.py add reduce import to fractal demo 2018-03-29 08:49:42 -07:00
GLBarGraphItem.py Added GLBarGraphItem example 2013-09-06 15:36:36 -04:00
GLImageItem.py examples: use integer division in indexing 2018-03-30 14:51:29 -04:00
GLIsosurface.py python3 fixes 2013-02-24 23:09:03 -05:00
GLLinePlotItem.py Fixed GLLinePlotItem line width option 2013-03-30 22:39:11 -04:00
GLMeshItem.py Allow GLMeshItem to draw edges from MeshData with face-indexed vertexes. 2014-03-10 23:04:10 -04:00
GLScatterPlotItem.py python3 fixes 2013-02-24 23:09:03 -05:00
GLshaders.py python3 fixes 2013-02-24 23:09:03 -05:00
GLSurfacePlot.py Added pg.gaussianFilter, removed all dependency on gaussian_filter 2014-03-11 19:01:34 -04:00
GLViewWidget.py python3 fixes 2013-02-24 23:09:03 -05:00
GLVolumeItem.py python3 fixes 2013-02-24 23:09:03 -05:00
GradientEditor.py - Major reorganization; we now follow the standard python package structure. 2012-12-26 17:51:52 -05:00
GradientWidget.py TickSliderItem: allowRemove property added (#1442) 2020-11-16 16:18:26 -08:00
GraphicsLayout.py python3 fixes 2013-02-24 23:09:03 -05:00
GraphicsScene.py - Major reorganization; we now follow the standard python package structure. 2012-12-26 17:51:52 -05:00
GraphItem.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
hdf5.py Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
histogram.py Add "left" and "right" step Modes (#1360) 2020-10-13 08:52:07 -07:00
HistogramLUT.py Update histogramlut example to allow rgb mode 2017-09-26 08:50:31 -07:00
imageAnalysis.py Add image hover callback to imageAnalysis example 2018-07-07 00:10:15 -07:00
ImageItem.py python3 fixes 2013-02-24 23:09:03 -05:00
ImageView.py Clean up examples / docs 2016-08-31 15:14:25 -07:00
infiniteline_performance.py infinite line performance improvement 2016-02-04 03:28:59 +01:00
InfiniteLine.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
initExample.py Fix up Qt.py and deprecate USE_XX variables 2018-02-16 20:42:34 -08:00
isocurve.py examples: use integer division in indexing 2018-03-30 14:51:29 -04:00
JoystickButton.py python3 fixes 2013-02-24 23:09:03 -05:00
Legend.py NEW options for LegendItem (#395) 2020-06-12 22:40:20 -07:00
linkedViews.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
logAxis.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
LogPlotTest.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
MouseSelection.py Corrected mouse clicking on PlotCurveItem - now uses stroke outline instead of path shape 2013-12-19 09:56:58 -05:00
MultiplePlotAxes.py AxisItem bugfix: corrected x-linked view update behavior 2013-03-19 11:49:10 -04:00
multiplePlotSpeedTest.py Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
MultiPlotSpeedTest.py Refactor MultiPlotSpeedTest.py 2018-02-03 11:01:03 +08:00
MultiPlotWidget.py Enhancement: [Issue/812]: just pass plotArgs keyword arguments 2020-07-19 19:16:07 +02:00
multiprocess.py Fixed print statements for python 3 2013-01-12 14:35:32 -05:00
optics_demos.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
PanningPlot.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
parallelize.py Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
parametertree.py Added context menu option to paramtree 2020-05-22 16:05:52 +02:00
PColorMeshItem.py Solve artifacts issues 2020-10-12 12:45:13 +02:00
PlotAutoRange.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
PlotSpeedTest.py python3 fixes 2013-02-24 23:09:03 -05:00
Plotting.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
PlotWidget.py Add warning about PySide 5.14, avoid a confusing error message that would appear with 5.14 2020-05-29 23:42:35 -07:00
ProgressDialog.py Prevent dialog from moving label/bar widgets on resize when nested 2017-10-04 09:01:51 -07:00
relativity_demo.py Added new demos: 2014-05-22 01:22:12 -04:00
RemoteGraphicsView.py Bugfixes: 2013-11-06 23:14:27 -05:00
RemoteSpeedTest.py python3 fixes 2013-02-24 23:09:03 -05:00
ROIExamples.py minor fixes 2018-06-15 14:18:38 -07:00
ROItypes.py Replaced usage of deprecated ROI classes in example (#946) 2019-06-21 21:19:02 -07:00
ScaleBar.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
ScatterPlot.py Scatter Plot Improvements (#1420) 2020-12-16 11:07:39 -08:00
ScatterPlotSpeedTest.py Scatter Plot Improvements (#1420) 2020-12-16 11:07:39 -08:00
ScatterPlotSpeedTestTemplate_pyqt5.py flip template line endings 2018-05-24 08:54:31 -07:00
ScatterPlotSpeedTestTemplate_pyqt.py Patch/window handling (#468) 2020-06-01 11:23:18 -07:00
ScatterPlotSpeedTestTemplate_pyside2.py flip pyside2 template line endings 2018-05-17 09:02:41 -07:00
ScatterPlotSpeedTestTemplate_pyside.py Patch/window handling (#468) 2020-06-01 11:23:18 -07:00
ScatterPlotSpeedTestTemplate.ui Patch/window handling (#468) 2020-06-01 11:23:18 -07:00
ScatterPlotWidget.py Fix py3 string handling in scatterplotwidget example 2018-05-09 10:56:01 -07:00
scrollingPlots.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
SimplePlot.py Merge branch 'viewbox_limits' into develop 2014-02-04 20:32:44 -05:00
SpinBox.py Permit entry of non-finite values into float SpinBox (#1422) 2020-10-27 21:26:05 -07:00
Symbols.py Peque scatter symbols (#1244) 2020-06-10 23:03:43 -07:00
syntax.py Use raw strings to get rid of DeprecationWarning 2020-09-20 13:59:44 -07:00
TableWidget.py TableWidget updates: 2013-03-06 06:27:24 -05:00
template.py Fix some bugs in PyQt5 2015-01-17 00:21:33 +08:00
test_ExampleApp.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
test_examples.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
text.py Fixed TextItem briefly drawing with incorrect transform. 2016-09-14 18:18:33 -07:00
TreeWidget.py python3 fixes 2013-02-24 23:09:03 -05:00
utils.py Add PColorMeshItem example to the app 2020-07-15 10:30:41 +02:00
verlet_chain_demo.py corrections to manifest 2014-12-23 15:55:52 -05:00
VideoSpeedTest.py Fix UnboundLocalError in VideoSpeedTest. 2019-09-13 01:07:57 -04:00
VideoTemplate_pyqt5.py add missing example template file 2016-11-04 22:47:10 -07:00
VideoTemplate_pyqt.py Fix VideoSpeedTest to disable RawImageGLWidget when openGL is unavailable 2016-10-26 09:26:01 -07:00
VideoTemplate_pyside2.py flip pyside2 template line endings 2018-05-17 09:02:41 -07:00
VideoTemplate_pyside.py Fix VideoSpeedTest to disable RawImageGLWidget when openGL is unavailable 2016-10-26 09:26:01 -07:00
VideoTemplate.ui Fix VideoSpeedTest to disable RawImageGLWidget when openGL is unavailable 2016-10-26 09:26:01 -07:00
ViewBox.py Fix line width in a few examples 2015-02-28 11:26:45 -05:00
ViewBoxFeatures.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
ViewLimits.py Removed duplicate limit-setting arguments 2014-01-31 13:04:47 -05:00