Commit Graph

2411 Commits

Author SHA1 Message Date
Dennis Göries
b622e22877
LegendItem: Make ItemSample customizable (#1404)
* 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
2021-01-04 21:02:08 -08:00
Hanwant
e209be20e5
Use log modulus transform for y axis log scaling (#1476)
* 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>
2021-01-04 19:27:03 -08:00
Martin Chase
1a71bb53c4
add unicode units (#1471)
* adds unicode units

* keep "u" and "Ohm" for compatibility
* add c, d, da and h
* lint

* py2 compatible u"" strings
2021-01-03 14:28:56 -08:00
Lee Tirrell
64e04e3120
Fix #798 (#1487) 2021-01-03 14:28:40 -08:00
Ogi Moore
e94f53ac20
minor adjustment on when test runs (#1479)
* minor adjustment on when test runs

* Remove pytest publish results, add sphinx nitpicky

* Deal with nit-picky mode later

* why bother w/ those artifacts...
2021-01-03 12:31:53 -08:00
Yoonyoung (Jamie) Cho
d8e4911fcd
Fixed GLViewWidget Gimbal Lock with Quaternion Parametrization (#909)
* Fixed GLViewWidget Gimbal Lock with Quaternion Parametrization

* fixed rotation name

* fixes extraneous pos argument and restore compatibility

* remove redundant getAxisAngle() in rotation (for Qt4 compatibility)

* GLViewWidget takes rotationMethod parameter

* Avoid merge conflict

* Fix docstring

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-12-24 21:45:02 -08:00
Ogi Moore
0356a358b3
Remove linting check, add pytest test publishing (#1477) 2020-12-23 23:04:30 -08:00
Kyle Sunden
d3049e41d7
Merge pull request #1474 from j9ac9k/migrate-to-github-actions
Migrate To Github Actions
2020-12-23 00:32:55 -06:00
Ogi Moore
5d33ccff8d Cleanup ExamplesApp 2020-12-22 22:10:59 -08:00
Ogi Moore
e5f123deb2 Add more badges 2020-12-22 22:08:31 -08:00
Ogi Moore
cc6a4d200c Add analyze segment - thanks to @ksunden 2020-12-22 21:18:13 -08:00
Ogi Moore
fcb387c86e Go to one yml file 2020-12-22 12:32:35 -08:00
Ogi Moore
c31cba5e06 Update README 2020-12-22 12:16:05 -08:00
Ogi Moore
bae760e598 Update pip first 2020-12-22 12:15:59 -08:00
Ogi Moore
b98216a2ea Use matplotlib qt5agg backend for pyside2 2020-12-22 10:27:15 -08:00
Ogi Moore
11db50dee5 Remove azure-pipelines configs 2020-12-22 10:27:12 -08:00
Ogi Moore
1c1187a10f swallow xvfb config option warnings 2020-12-22 10:26:20 -08:00
Ogi Moore
6eace48663 Skip openGL tests on some macOS configs 2020-12-22 10:26:19 -08:00
Ogi Moore
2689cdb5f6 Fix regex warning 2020-12-22 10:26:19 -08:00
Ogi Moore
e7f64a8fc1 add pytest-xdist 2020-12-22 10:26:19 -08:00
Ogi Moore
a7d9034f83 Update mesa3d drivers 2020-12-22 10:26:19 -08:00
Ogi Moore
181b6ee005 Re-introduce xvfb debug steps 2020-12-22 10:26:19 -08:00
Ogi Moore
f4df660363 Skip test_ExampleApp 2020-12-22 10:26:19 -08:00
Ogi Moore
3cd9f9ff63 skip test_reload 2020-12-22 10:26:19 -08:00
Ogi Moore
d0b26112bc add quotes around string with astricks 2020-12-22 10:26:19 -08:00
Ogi Moore
34e9ee7c91 Add pre-build stage 2020-12-22 10:26:19 -08:00
Kyle Sunden
3b1e55af1e
MAINT: Post 0.11.1 release, drop py2, qt4 (#1473)
* 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
2020-12-22 10:25:06 -08:00
Kyle Sunden
cd40562121
Merge pull request #1472 from ksunden/changelog
Update Changelog for release 0.11.1
2020-12-19 20:39:52 -06:00
Ogi Moore
195f609b31 Update __version__ 2020-12-19 09:17:23 -08:00
Ogi Moore
ab478d1231 Page 1 2020-12-19 08:54:27 -08:00
Ogi Moore
cf64e75de3 Page 2 2020-12-19 08:31:22 -08:00
Kyle Sunden
625469af74 page 3 2020-12-19 01:08:33 -06:00
Kyle Sunden
fa444a1d94 page 4 2020-12-18 23:49:50 -06:00
Ogi Moore
b2c9b98bae Add Page5 2020-12-18 21:11:17 -08:00
Kyle Sunden
35167df2e6 Update Changelog for release 0.11.1 2020-12-18 21:35:15 -06:00
miranis
c5c41b9090
zero-step in np.arange (#1468) 2020-12-17 22:48:55 -08:00
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
Marko Toplak
1847bfcf97
Remove ViewBox.childGroup ItemClipsChildrenToShape flag (#1458)
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.
2020-12-09 22:45:21 -08:00
Ogi Moore
a99bda0bb7
Use conda-forge on pyside2+linux (#1464) 2020-12-09 22:43:21 -08:00
Marko Toplak
00fd63e859
arrayToPath: revert to old meaning of connect=ndarray parameter (#1461)
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.
2020-11-27 07:57:26 -08:00
2xB
433b061e81
Fix TickSliderItem: Avoid ghost ticks | Improved customPlot.py code (#1459)
* 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>
2020-11-26 22:28:03 -08:00
Ogi Moore
d2255228ba
resolve ordering of issues presented in #1322 (#1456) 2020-11-23 12:12:14 -08:00
Luke Campagnola
6c7bd87592
Fill in non-finite plot values for Qt versions >= 5.12.3 (#1287)
* Fill in non-finite plot values for Qt versions >= 5.12.3

* handle the case of all nan entries

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-11-22 20:27:24 -08:00
Matt Liberty
a3fbd18239
Clipped AxisItem tick value labels to prevent drawing artifacts #732 (#1447) 2020-11-21 00:46:31 -08:00
Ogi Moore
71a92a6fd2
Fix autosize not taking to correct range with TextItem in view (#1435)
* Removing first call to updateMatrix in resizeEvent
2020-11-21 00:02:32 -08:00
Julius Juodakis
0e816f1dbe
InfiniteLine caching calls merged (fixes #1450) (#1452) 2020-11-20 21:27:55 -08:00
2xB
5adb1b9a5b
Fixes for examples\customPlot.py (#1448)
* 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>
2020-11-19 10:19:32 -08:00
Nils Nemitz
6c14204682
Fix set empty (#1446)
* 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
2020-11-18 09:31:28 -08:00
2xB
020b7077cb
TickSliderItem: allowRemove property added (#1442)
* 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>
2020-11-16 16:18:26 -08:00
2xB
c359d5fad9
Fix ViewBox axis zoom in RectMode and examples/customPlot.py (#1443)
* Fix examples/customPlot.py: mouseDragEvent misses axis argument

Fixes #1277

* customPlot.py: Update methodolgy to disable menu

If there's an argument for this, we should use it

* customPlot.py: Show how to disable axis interaction

* Fix ViewBox: Moving axis in RectMode not implemented => use normal move mode

Grabbing an axis in RectMode leads to the zoom rectangle being displayed
in unreasonable positions. In this case, fall back to normal mode.

* customPlot.py: Only disable right-click zoom for demonstration

In cases where continuous zooming is not wished (e.g. in case of
complicated rebinning after zooming), this might come in handy
and there is no reason not to show it.

Co-authored-by: 2xB <2xB@users.noreply.github.com>
2020-11-16 14:27:40 -08:00