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
..
2018-05-23 21:12:16 -07:00
2018-06-22 17:31:58 -07:00
2017-10-18 00:18:46 -07:00
2013-03-26 13:46:26 -04:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2020-04-27 11:43:22 -07:00
2014-09-25 17:26:06 -04:00
2014-05-08 09:50:26 -04:00
2013-02-24 23:09:03 -05:00
2014-06-27 10:55:55 -04:00
2015-01-17 00:21:33 +08:00
2016-08-31 15:14:25 -07:00
2018-03-29 08:49:42 -07:00
2013-09-06 15:36:36 -04:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2013-02-24 23:09:03 -05:00
2016-08-31 15:14:25 -07:00
2013-02-24 23:09:03 -05:00
2020-06-12 22:40:20 -07:00
2018-02-16 12:21:39 +08:00
2020-10-12 12:45:13 +02:00
2013-02-24 23:09:03 -05:00
2014-05-22 01:22:12 -04:00
2013-11-06 23:14:27 -05:00
2013-02-24 23:09:03 -05:00
2018-06-15 14:18:38 -07:00
2020-06-10 23:03:43 -07:00
2013-03-06 06:27:24 -05:00
2015-01-17 00:21:33 +08:00
2013-02-24 23:09:03 -05:00
2020-07-15 10:30:41 +02:00
2014-12-23 15:55:52 -05:00
2015-02-28 11:26:45 -05:00