* extend ColorMap functionality for palette management
* manual merge with changes in master branch
* extend ColorMap functionality for palette management
* manual merge with changes in master branch
* light mode / dark mode swapping demo
* color map updates
* added ColorCET and Matplotlib import for color maps
* minor cleanup
* restored lost indent
* Code cleanup
* Add colorcet as optional dependency
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
* LegendItem: Introduce itemStyles and provide ToggleItem
Show example
* Minor cleanup of the legend item and test
* Make ItemSample customizable
* Remove example modifications
* Changes for sampleType according to review
* Use log modulus transform for y axis log scaling
* Update log modulus to use eps and retain behaviour around -1 < x < 1
* Update setLogMode Dosctring
* Update setLogMode docString
Co-authored-by: Hanwant <admin@madigan.tech>
* minor adjustment on when test runs
* Remove pytest publish results, add sphinx nitpicky
* Deal with nit-picky mode later
* why bother w/ those artifacts...
* MAINT: Post 0.11.1 release, drop py2, qt4
This focuses on distribution, tests, and docs. This may not be comprehensive, but covers the cases I found by looking and a few greps
Noteably, this does not change any actual internal code yet, to avoid merge conflicts with pending PRs.
* NEP 29 language/versions
* 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
The flag was set on ItemClipsChildrenToShape to solve the issue of #316
"A GraphicsItem object overlaps the ViewBox border line" at Luke Campagnola's
suggestion to solve further issues that @espdev had. Luke wisely
commented that this approach needs extensive testing.
We tested it. It broke PDF export in Orange. :)
A solution to #316 was merged in PR #321, which was refined from the discussion
in #316. I am not sure that, given rest of #321, the ItemClipsChildrenToShape
was really needed. Even without modifications to ChildGroup I did not
see any border problems (but I could replicate them in pre-#321 pyqtgraph).
Removing this flag fixes (and unneeded supporting code) fixes PDF export
regression in Orange while borders still seem a-OK.
The i-th position of that array used to define if points (i) and (i+1)
were connected, but in master it defines whether points (i-1) and (i) are connected.
This commit reverts to (i) and (i+1) interpretation.
* Fix TickSliderItem: Avoid ghost ticks | Improved customPlot.py code
If `TickSliderItem.setTickValue` was called when a full repaint of the `TickSliderItem` was
not already scheduled, the tick was visible at the old and the new position. This could e.g. be seen
when using the autoscale button in the `customPlot.py` example.
Further, code from `customPlot.py` is improved to make use of `Tick.setVisible` instead of adding and
removing ticks based on their visibility.
* customPlot.py: Explain bool conversion
Co-authored-by: 2xB <2xB@users.noreply.github.com>
* Fix examples\customPlot.py: Not object-oriented
Copy-paste error: I referenced a specific object instead of self. Fixed.
* Fix examples\customPlot.py: Allow calling setTicks more than once
This fixes a bug where TickSliderItem is expected to return ticks.keys() but while it returns ticks.items().
Also: Minor code correction.
* Fix examples\customPlot.py: Avoid scaling differences
Consider padding of TickSliderItem for link between ViewBox and ticks
Co-authored-by: 2xB <2xB@users.noreply.github.com>
* changes to setData and dataRect to handle setting empty data
* simplified named argument check
* tests for clearing PlotDataItem by setData() and setData([],[]), commented out vestigal xClean/yClean
* removed last remains of xClean/yClean
* TickSliderItem: allowRemove property added
Following #744, this PR suggests the addition of a property
`allowRemove` to `TickSliderItem` and therefore also to
`GradientEditorItem`. It sets the default of whether ticks can
be removed by the user and therefore contemplates `allowAdd`.
I would be interested in other opinions on this design decision,
as #744 suggests to reuse `allowAdd` for the prohibition of
tick removal.
I personally suggest this solution, since it does not change
the effect of the current API.
Fix#744
* customPlot.py: Added markers to example using TickSliderItem
* examples\GradientWidget.py: Demonstrate use of allowRemove
Co-authored-by: 2xB <2xB@users.noreply.github.com>