Commit Graph

1889 Commits

Author SHA1 Message Date
Dennis Göries
55a9e19e43
ScatterItem: Fix name setting (#1405) 2020-10-20 20:02:53 -07:00
Ogi Moore
7e57e07068
example app now works with Qt4 and Python2 again (#1302)
* example app now workw with Qt4 and Python2 again

* Example App is now part of the test suite

* Add initExample

* No scary warning when launching examples

* Fix scary examples.__main__ warning

* Use courier new font as its on all platforms

* Remove commented out code

* Add newline

* Updated docs, example app now tested

* Non-relative import for example app

* Proper importing now
2020-10-19 11:51:12 -07:00
Nils Nemitz
65e90faec5
dynamic range limiting in PlotDataItem (#1140)
* dynamic range limiting in PlotDataItem

* revised version of cynamic range limiting

* replaced == with is operator

* removed unicode +- character, converted to ascii

* code/docstring cleanup

* clean state with changes

* silenced numpy all-NaN warnings

* reverted PlotWidget.py to original

* reverted PlotWidget.py to original

* reverted PlotWidget.py to original

* rewrapped/reformated setDynamicRangeLimits docstring

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-10-18 22:34:41 -07:00
Julius Juodakis
39f9c6a6aa
caching for viewRect of LinearRegionItem to reduce CPU load (#1391)
* caching for boundaryRect of LinearRegionItem

* caching viewRect at GraphicsItem
2020-10-18 16:42:40 -07:00
Ogi Moore
2c02d58134
Do not apply transparent background in Qt4 (#1403)
* Do not apply transparent background in Qt4

* Tests need to reflect this change too
2020-10-17 23:01:16 -07:00
Dennis Göries
b5de577c28
LegendItem: Enable customization of label text size and tests (#1397)
* LegendItem: Enable customization of label text size and tests

* One more CI

* Remove deleteLater of QAPP in legend item test

* Remove assert statement in setLabelTextSize

* Modify legend test without assertion
2020-10-15 10:56:34 -07:00
Ogi Moore
5eb671217c
Docs should have no warnings on pcolormeshitem (#1400) 2020-10-15 10:12:36 -07:00
Kenneth Lyons
1f76ac0e2c
Add a docs build job to CI (#1328)
* Add a docs build job to CI

* Add sphinxopts to fail on warning

* Test sphinx warning

* Redid ci stage conditionals

* update conf.py to remove deprecation warning

* introduce 3rd stage for proper conditionals

* Attempt to fix malformed table

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-10-15 08:43:23 -07:00
Dennis Göries
3b6eb02520
AxisItem: Account for empty strings in the visibility of text and units (#1367)
* Rebase

* make the tests work

* add test and rather more cleanup

* Cleanup for axisitem visibility test

* Another cleanup in test axis item
2020-10-14 20:40:54 -07:00
Mitchel Paulin
e7b11cb39a
Fixed bug where removeTempArea would be called on home even if it was not defined (#1349)
* Fixed bug where removeTempArea would be called on home even if it was not defined

* Made the check for whether or not home is defined more explicit
2020-10-14 10:07:12 -07:00
Ogi Moore
9413dc8005
Disable mouse rate limiting (#1399) 2020-10-13 22:33:00 -07:00
Allard Hendriksen
9d99a3e7b0
Fix incorrect rendering of overlapping object in renderToArray() (#1306)
This commit adds a depth buffer in renderToArray().

This fixes the issue that overlapping objects are rendered incorrectly
when using renderToArray() on a GLViewWidget.

This might be related to issue #743.
2020-10-13 19:47:49 -07:00
Dennis Göries
287d564d7d
GraphicsView: Add basic tests ... (#1396) 2020-10-13 09:06:34 -07:00
Carlos Pascual
23a46b5fb9
Add "left" and "right" step Modes (#1360)
* Add "lstep" and "rstep" step Modes

stepMode is currently either True or False. If it is True,
it requires the user to make len(x) = len(y)+1. This is
inconvenient because it makes it difficult to change the
stepMode on a given curve (just as one would change, e.g.,
its color).

This commit extends the current situation by introducing
two more step modes: "lstep" and "rstep", which do not require
passing an extra x value. In turn, this modes associate each
y value to either the left or the right boundary of the step.

For example, the "rstep" mode is handy when plotting "life"
digital signals in which x,y data pairs are appended as they
are read.

This commit does not modify the behaviour in case of stepMode=True

* Replace step mode names: lstep,rstep -> left,right

* Improve docs for stepMode

Reword docstring and add it to PlotDataItem class too

* Document left and right stepModes as added in v 0.12.0

TODO: confirm the exact version number to use here

* Add comments stress the need for "is True"

Some conditional statements in the code regarding stepMode are
done with "is True". This is actually required since other
possible values such as "left" also evaluate as true but should
not be caught.

* Deprecate boolean API for stepMode

Introduce stepMode="mid" as a replacement of stepMode=True,
but keeping full backwards compatibility with the old API.
Adapt docs, examples and tests accordingly.

* Raise ValueError on unsupported stepMode values

* Rename "mid" step mode to "center"

* Remove "added in 0.12.0" note

See https://github.com/pyqtgraph/pyqtgraph/pull/1360#discussion_r502746919

* Add deprecation warning when stepMode=True

Issue a DeprecationWarning if stepMode=True is being passed to the
constructor or setData() of PlotDataItem or PlotCurveItem.

Note: warnings module is imported locally so that it is esier to
remove once this check is no longer needed.

* Fix wrong syntax in last commit

Fix usage of "default" kwarg in dict.get()
2020-10-13 08:52:07 -07:00
Dennis Göries
325a15a6ef
SignalProxy: Correct initialization without slot argument and tests (#1392)
* SignalProxy: Correct initialization without slot argument and provide tests

* Add missing slot is None case on disconnect

* Start new tests

* Exception block

* Test no module

* Different signal

* Debugging the signal connect

* Re initialize proxy after disconnect

* Add more test cases for blockSignal

* Change test case for signal count

* Give up for python 2 and pyside

* Exclude for Python 2.7 and PySide

* Convert float to integers in timer start period
2020-10-13 08:50:22 -07:00
Ogi Moore
4946a57987
Merge pull request #1382 from dgoeries/code-quality-legend
LegendItem: A bit auto flake8
2020-10-12 22:28:00 -07:00
Ogi Moore
539394e20c
Merge pull request #1362 from bruchar1/make-terminal-sortable
DataTreeWidget exception with multivalue Terminal (flowchart)
2020-10-12 21:46:28 -07:00
Ogi Moore
2955b26fb2
Merge pull request #1383 from dgoeries/transparent-palette
GraphicsView: Set a transparent background palette
2020-10-12 19:44:53 -07:00
Ogi Moore
3f7a9bb642
Merge pull request #1273 from edumur/develop
Implemented pColorMeshItem
2020-10-12 09:24:10 -07:00
Etienne Dumur
5ab0cef017 Solve artifacts issues
Add a parameter "antialiasing".
Remove profiler
Add pyqtgraph mkPen
2020-10-12 12:45:13 +02:00
rafael
fbf1a2fe18
ScatterPlotItem: Make + and x symbols thicker
This is something we're overriding in Orange3 (biolab/orange3#5007), as we change the symbols' alpha_value to show selected symbols. The default + and x symbols are too thin to show a noticeable change in alpha_value.

But I thought you might agree that the symbols look nicer this way.
2020-10-01 12:57:04 +02:00
Dominik Kutra
5842f42632
fix typo in documentation
found a tiny typo when reading the docs...

thank you guys for this awesome library 🚀
2020-09-29 17:29:52 +02:00
Dennis Goeries
9a51fc3662 GraphicsView: Set a trnasparent background palette 2020-09-26 14:36:43 +02:00
Dennis Goeries
6dc0b2c16d LegendItem: A bit auf auto flake8 2020-09-26 14:09:21 +02:00
Etienne Dumur
bd51fa7c87 Clean code, improve boundingRect 2020-09-23 09:27:23 +02:00
Kenneth Lyons
a90c443b7a
Fix PlotItem.setAxisItems (#1376)
* Fix PlotItem.setAxisItems

- Use extend so visibleAxes remains a flat list.
- More robust logic for detecting adding an AxisItem instance to
  mulitple plots and suggest a workaround in the error message.

* Simplify membership check

* Add test for PlotItem setAxisitem logic
2020-09-22 20:25:02 -07:00
Kenneth Lyons
e78e9c256d Consolidate and fix downsample factor computation in ImageItem 2020-09-20 22:06:00 -07:00
Ogi Moore
043b6b47ea
Merge pull request #1375 from ixjlyons/test-vector
Add targeted Vector test coverage
2020-09-20 14:54:47 -07:00
Kenneth Lyons
3ea32ff447
Merge pull request #1374 from ixjlyons/test-warnings-cleanup
Test warnings cleanup
2020-09-20 14:52:49 -07:00
Kenneth Lyons
fc957bbc4b Add targeted Vector test coverage 2020-09-20 09:19:39 -07:00
Kenneth Lyons
f1d0ea99b6
Merge pull request #1364 from meganbkratz/logScaleBugFix
fix for log scaling being broken
2020-09-16 22:27:04 -07:00
Kenneth Lyons
9e76f22750
Merge pull request #1368 from bruchar1/wrong-disconnect-receiver
Fix disconnect() in Flowchart with wrong receiver slot
2020-09-16 22:04:17 -07:00
Jens Hedegaard Nielsen
1d10561974 fix deprecation warning
the argument to qtimer.start should be an int not a float

the current code raises a deprecation warning with python 3.8
2020-09-16 10:48:37 +02:00
Charles Brunet
b2ceb8d053 Fix disconnect() in Flowchart with wrong receiver slot 2020-09-14 13:42:16 -04:00
Megan Kratz
46f8f1633f fix for log scaling being broken -- log was being taken twice, resulting in nan. Now it's only being taken once 2020-09-10 19:20:12 -04:00
Charles Brunet
a8417b6478 fix exception in DataTreeWidget when clicking on a node with multivalue Terminal connected 2020-09-10 08:59:17 -04:00
Kenneth Lyons
9fdaffaf7d
Merge pull request #1336 from ales-erjavec/fixes/arrow-item-parent-arg
Fix an error in ArrowItem constructor when passed a parent=... argument
2020-08-17 21:07:18 -07:00
Ales Erjavec
3d391d46e3 Add parent to ArrowItem's constructor signature 2020-08-17 09:27:23 +02:00
Ales Erjavec
52717fa8b7 Rename test 2020-08-17 09:25:37 +02:00
Kenneth Lyons
11b76a1a6f
Merge pull request #1339 from outofculture/vector-init-qt5
Vector init in qt5
2020-08-16 08:40:06 -07:00
Martin
7bf4e597d9 improve docstring formatting and wording 2020-08-15 22:15:58 -07:00
Kenneth Lyons
ab13cd450e
Merge pull request #1331 from LocutusOfBorg/new-sip
sip: switch to new PyQt5 api import, with fallback to the old impleme…
2020-08-15 12:45:05 -07:00
Martin
75899f0c4e conform to docstring format 2020-08-11 12:34:53 -07:00
Martin
817753bd82 right, we're camels here 2020-08-11 12:34:53 -07:00
Martin
9f996d041c Vector.__init__ improvements
* added docstring
* fixed handling of QVector3D args (cannot list() them)
* refactor to no longer need return statements
2020-08-11 12:34:53 -07:00
Kenneth Lyons
c8fc221e81
Merge pull request #1334 from termim/PlotCurveItem
More data validity checks in PlotCurveItem
2020-08-03 15:14:07 -07:00
Kenneth Lyons
7504f2ba27
Merge pull request #1326 from ixjlyons/doc-multiplotitem
Improve docs for MultiPlotWidget and MultiPlotItem
2020-08-01 17:19:18 -07:00
Ales Erjavec
a9049f1d4d Pop the 'parent' arg from ArrowItem opts parameter dict
If not, then an `KeyError: 'Invalid arrow style option "parent"'`
 is raised in setStyle.
2020-07-28 10:01:15 +02:00
Mikhail Terekhov
471d7415ee PlotCurveItem.dataBounds: more checks for empty range 2020-07-27 15:50:34 -04:00
Mikhail Terekhov
1ad3eacb78 PlotCurveItem.boundingRect: check for None returned from self.dataBounds 2020-07-27 15:50:26 -04:00
Gianfranco Costamagna
32a79f18a4 sip: switch to new PyQt5 api import, with fallback to the old implementation if not found.
Also calls to setapi are not needed anymore, so use them only with the old implementation.

See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966045
for reference
2020-07-27 14:52:07 +02:00
Luke Campagnola
abfac52c34
Merge pull request #1321 from campagnola/revert-plotcurveitem-changes
Revert plotcurveitem changes from 18999c
2020-07-21 06:43:06 -07:00
Etienne Dumur
85378004ef Correct Pyside bug 2020-07-20 09:36:14 +02:00
Kenneth Lyons
c0da4c545e Improve docs for MultiPlotWidget and MultiPlotItem 2020-07-19 14:28:58 -07:00
angulartist
5765b0d4c2 Enhancement: [Issue/812]: remove unused import 2020-07-19 19:16:58 +02:00
angulartist
58aa9306df Enhancement: [Issue/812]: just pass plotArgs keyword arguments 2020-07-19 19:16:07 +02:00
angulartist
ae4483bfaa Enhancement: [Issue/812]: MultiPlotItem handles pen (QPen) as a keyword argument 2020-07-19 15:58:13 +02:00
Luke Campagnola
b031a0a235 Revert changes from 18999c - these incorrectly change the API.
Also tidy up a little
2020-07-18 23:41:35 -07:00
Ogi Moore
5e20d20246
Merge pull request #1319 from campagnola/acq4-merge
Acq4 merge
2020-07-17 11:57:08 -07:00
Luke Campagnola
6fe23887b8 update reload unit test 2020-07-17 10:00:32 +03:00
Luke Campagnola
57f2f876d3 clean up exceptions on windows (don't show syntax error from eval attempt) 2020-07-17 09:55:46 +03:00
Luke Campagnola
7eb2bf6306 reload fix - don't reload files with no pyc 2020-07-17 09:54:51 +03:00
Luke Campagnola
31b0ddcee6 ptime fix - return precision clock time on py3 2020-07-17 09:53:19 +03:00
Dennis van Gils
603e1b98bc Fix line width not being set 2020-07-16 21:13:33 +02:00
Etienne Dumur
2822790087 Correct Python 2 compatibilities and improve comments 2020-07-15 10:32:29 +02:00
Kenneth Lyons
d70e870a44
Merge pull request #1309 from ibrewster/polylineroifix
Properly retain and use hoverPen argument in _PolyLineSegment
2020-07-13 21:28:06 -07:00
Kenneth Lyons
b058d032d1 Fix some warnings 2020-07-13 21:09:31 -07:00
Luke Campagnola
f015f0879e TargetItem fix + performance improvements
- avoid extra work when setLabelAngle would have no effect
- fix errors from bad parent transform (usually the displaying widget has not been given a size yet)
2020-07-13 16:37:29 -07:00
Luke Campagnola
cb48ec94b7 performance fix for histogramlutitem
setImageItem is now able to detect trival color gradients like gradientChanged has previously.
2020-07-13 16:25:43 -07:00
Luke Campagnola
dce9a5bf0c
Merge pull request #1310 from campagnola/acq4-merge
Acq4 merge
2020-07-13 16:13:38 -07:00
Luke Campagnola
268ba38543 docstring update 2020-07-13 15:31:47 -07:00
Luke Campagnola
5723853308 revert behavior: reload modules with no pyc
Should fix unit test. Also: return a structure from reloadAll describing reasons for failure of each module to reload.
2020-07-13 15:29:00 -07:00
Luke Campagnola
605b0b2144 code cleanup 2020-07-13 13:45:31 -07:00
Luke Campagnola
0df7cbcd06 Fix Vector.__init__ for Qt5 + cleanup 2020-07-13 13:10:58 -07:00
Israel Brewster
3878ab6946 Properly retain and use hoverPen argument in PolyLineSegment function of PolyLineROI 2020-07-13 12:10:49 -08:00
Luke Campagnola
78702eea8b code cleanup 2020-07-13 13:06:27 -07:00
Luke Campagnola
eb4dd5626f SimpleParameter.setValue: coerce value for int parameters 2020-07-13 13:05:56 -07:00
Luke Campagnola
f9327ea910 Rate-limit event processing inside ProgressDialog 2020-07-13 12:55:12 -07:00
Luke Campagnola
ab5a2c5d11 BusyCursor: only restore cursor after all nested levels have exited 2020-07-13 12:53:59 -07:00
Luke Campagnola
6214ff6de8 Add Pa to units 2020-07-13 12:53:06 -07:00
Luke Campagnola
e2669f074b Add test for functions.subArray 2020-07-13 12:52:55 -07:00
Luke Campagnola
421b7bdc78 add SignalProxy.block for temporarily disabling signal forwarding 2020-07-13 12:52:25 -07:00
Luke Campagnola
993871b1ae InfinifteLine.setPos add support for array arg 2020-07-13 12:51:03 -07:00
Luke Campagnola
893c85053f debug.ThreadTrace add support for thread names 2020-07-13 12:50:24 -07:00
Luke Campagnola
c51a84ae4e Fix console exception filtering for py3 2020-07-13 12:49:57 -07:00
Luke Campagnola
0bc186fe7d Fix reload to use mod.__cache__ to get name of pyc files 2020-07-13 12:43:11 -07:00
Felipe Silveira
9a83b72e9d
Import ThreadSafeTimer in __init__
This fixes issue #1303
2020-07-08 10:03:32 -03:00
Ogi Moore
c03018005a
Merge pull request #1291 from ixjlyons/roi-axisorder
Get ImageView ROI working with both row and col major data
2020-07-07 10:54:26 -07:00
Luke Campagnola
6a5e7cfee5 ArrowItem performance
- Avoid updates that would have no effect
- Raise exception on invalid arguments to setStyle
2020-07-06 01:27:43 -07:00
Luke Campagnola
5e971b646f update h5py deps in metaarray
- update h5py usage to support latest version
- bugfix in __getitem__ for fancy indexing
- code cleanup
2020-07-06 01:08:01 -07:00
Luke Campagnola
268d25c125 TextItem performance
Avoid expensive work if textitem is not visible, or when setPlainText / setHtml would have no effect.
2020-07-06 00:24:13 -07:00
Luke Campagnola
6f69b11c26 console fixes
- add fileno method since console occludes sys.stdout
- fix editor spawning
- don't store sys.stdout, since this is not guaranteed to be the real stdout
2020-07-05 23:06:05 -07:00
Luke Campagnola
ac417a6567 py3 fixes 2020-07-05 22:52:15 -07:00
Ogi Moore
da15f09479
Merge pull request #1289 from ksunden/dai_si_prefix
Disable autoSIPrefix for DateAxisItem by default
2020-07-05 10:50:54 -07:00
Kenneth Lyons
6052ba7668 Get ImageView ROI working with both row and col major data 2020-07-04 23:14:08 -07:00
Kyle Sunden
a4dbcfb1e1 Disable autoSIPrefix for DateAxisItem by default
When adding a label, it adds the offset for the epoch seconds, (1e09), which is not helpful for date axes
2020-07-03 17:02:58 -05:00
Luke Campagnola
b79c979663
Merge pull request #1283 from zhujun98/fix_array_to_qpath
Fix arrayToPath
2020-06-29 16:35:27 -07:00
zhujun98
b61c7c1e39 Fix the cases with connect being 'pairs' and 'finite' 2020-06-29 23:20:29 +02:00
Etienne Dumur
eb6a93d26e Modify syntax to pass error 2020-06-29 18:28:52 +02:00
Etienne Dumur
52c607de64 Revert "Modify syntax to pass error"
This reverts commit 09a0311fa8.
2020-06-29 18:27:37 +02:00
Etienne Dumur
09a0311fa8 Modify syntax to pass error 2020-06-29 18:21:15 +02:00
Kenneth Lyons
3cf2845743
Improve control over ROI/handle pens (#1285)
* Exposed ability to set pens for handles and hovering for ROIs

* Consistent color format for pen creation

* Exposed ability to set pens for handles and hovering for ROIs

* Consistent color format for pen creation

* Add handleHoverPen arg to ROI and rename Handle arg to hoverPen

Co-authored-by: nmearl <nchlsearl@gmail.com>
2020-06-28 22:44:13 -07:00
Kenneth Lyons
8a3d4bab2f Update doc strings to clarify getArrayRegion API for ROI subclasses 2020-06-28 14:39:12 -07:00
zhujun98
7016d1c6c3 Fix arrayToPath
Use the correct format for streaming QByteArray to QPainterPath.
2020-06-28 21:23:06 +02:00
Etienne Dumur
667c41d22b PColorMeshItem know require only one 2d array
Allow PColorMeshItem to work with only one 2d array, a regular grid is then assume for the polygons vertices.
Improvement of comments.
2020-06-28 20:32:22 +02:00
Kenneth Lyons
4110b3e539
Handle axis SI prefix scaling in MatplotlibExporter (#1282)
* Handle axis SI prefix scaling in MatplotlibExporter

* Added some MatplotlibExporter tests and added matplotlib to CI deps

* Install mpl with pip instead of conda

* Cleanup
2020-06-28 08:51:34 -07:00
Etienne Dumur
919ee54b59 Add edgecolor parameter
Allow user to set the polygons edge color.
2020-06-28 14:50:44 +02:00
Etienne Dumur
d32d61a1e2 Various improvements
Make an example displaying more clearly the Item capability.
Correct few bugs in the Item class.
Improve overall comments.
2020-06-28 14:49:20 +02:00
Kenneth Lyons
96d1ef986f
Merge pull request #330 from lidstrom83/Parameter.defaultBtn_autoDefault
Set parameter's default button autoDefault value to False
2020-06-27 15:12:03 -07:00
Ogi Moore
a719a06b8b
Merge pull request #467 from meganbkratz/derivativePlots_cleanup
Add dy/dx and y vs. y` plot modes to context menus from plots.
2020-06-27 12:50:44 -07:00
Ogi Moore
264d63e90e Update PyQt5, PySide2, PySide1 Templates, apply else statement 2020-06-26 23:51:09 -07:00
Etienne Dumur
4e7b8dce17 Update PColorMeshItem.py 2020-06-25 22:41:30 +02:00
Etienne Dumur
cbbd8287ad Remove matplotlib dependencies 2020-06-25 22:07:41 +02:00
Ogi Moore
ce6da3e93f First pass at implementing the diff from PR307 2020-06-24 23:34:17 -07:00
Kenneth Lyons
b41c4a71e5
Fix Parameter.hasDefault (#1275)
When a default value is not set, hasDefault returns False. If
default=None is passed, hasDefault still returns False.
2020-06-24 21:35:05 -07:00
Ogi Moore
302d66dd67
Add tickAlpha to AxisItem Style Options (#1274)
* Add tickAlpha setting to AxisItem style

* reworking setTickAlpha docs, redo logic based on types

Co-authored-by: demonchild2112 <denverlovesyou@gmail.com>
2020-06-24 17:42:28 -07:00
Ogi Moore
43328eb053
Merge pull request #1270 from j9ac9k/implement-pr-403
Implement pr 403
2020-06-24 15:56:59 -07:00
Ogi Moore
b8abd5d02e Don't let axis item reduce space 2020-06-24 15:40:01 -07:00
Ogi Moore
14d5085636
Merge branch 'develop' into derivativePlots_cleanup 2020-06-23 23:03:56 -07:00
Ogi Moore
fd0bbeb9db
Merge pull request #1272 from maxkl/develop
LegendItem: fix clear() not closing widgets
2020-06-23 21:04:35 -07:00
Etienne Dumur
426a70ae60 Implemented pColorMeshItem 2020-06-23 19:59:04 +02:00
Max Klein
78d11f8a71
LegendItem: fix clear() not closing widgets 2020-06-23 17:01:02 +02:00
Ogi Moore
a192707654 Implement PR403-diff 2020-06-22 23:02:48 -07:00
Ogi Moore
55e89bccef
Merge pull request #117 from onlyjus/feature-resizeFlowchartNode
Feature: Flow chart nodes resize based on inputs/outputs
2020-06-22 22:49:15 -07:00
Karl Georg Bedrich
1666407a89
ImageView.Timeline better visibility and fixed (#400)
* make imageView-timeline unmovable

* imageview.timeline now visible over white background

* activate splitter when roi visible

* Re-add roiCurves

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-22 22:48:54 -07:00
Ogi Moore
91ee83ab36
Merge pull request #402 from vladimir-kraus/develop
added method clear() to GLViewWidget
2020-06-22 20:58:04 -07:00
Ogi Moore
1fe3731ec2
Merge branch 'master' into develop 2020-06-22 20:37:55 -07:00
Ogi Moore
6643d73903
Merge pull request #1268 from ixjlyons/dock-container-none
Check for container before setting dock orientation
2020-06-22 19:58:59 -07:00
jeremysee2
f81768ac59
Issue #1260: Added exception to checkOpenGLVersion to highlight OpenGL ES incompatibility on Raspberry Pi (#1264)
* checkOpenGLVersion exception for OpenGL ES

* checkOpenGLVersion exception

* checkOpenGLVersion exception

* python 2/3 compatibility

* Refactoring checkOpenGLVersion

Since the original goal of `checkOpenGLVersion` is to re-throw an exception or notify the user about a wrong OpenGL version in another exception, this commit unifies the two exception messages from `checkOpenGLVersion`.
Further, it corrects ">" to ">=" in the error message (originally my fault).
And it corrects verNumber to be an integer and not a boolean (there was a " < 2" too much at the end of the line).
Finally, since the opportunity was there, the method is further refactored, comments and a docstring are added.

Co-authored-by: 2xB <2xb@users.noreply.github.com>
2020-06-21 13:59:44 -07:00
Kenneth Lyons
0b98140893 Check for container before setting dock orientation 2020-06-20 12:27:29 -07:00
Kenneth Lyons
352a8a425a Add mouse event to PlotCurveItem sigClicked signature 2020-06-19 23:00:02 -07:00
Ogi Moore
0c08adc411
Merge pull request #1257 from VesnaT/tickFont_painter
AxisItem: Make painter (tick) font dependent
2020-06-15 07:54:25 -07:00
Vesna Tanko
ad4f796e32 AxisItem: Make painter tick font dependent 2020-06-15 11:03:50 +02:00
Ogi Moore
362dc93a9d
Merge pull request #1256 from j9ac9k/Implement-PR-317
Implement diff from PR 317
2020-06-13 21:49:33 -07:00
Ogi
8b557af23f Implement diff from PR 317 2020-06-13 21:21:29 -07:00
Ogi Moore
ecd0642ca9
Merge pull request #977 from campagnola/pseudoscatter-performance
Add a faster method for computing pseudoscatter
2020-06-13 21:08:33 -07:00
Ogi Moore
1744bb09a9
Merge pull request #1251 from dearkarm/patch-1
DateAxisItem: Parameterize utcOffset during construction
2020-06-12 22:53:20 -07:00
Ogi Moore
5f5803264b
Merge pull request #1252 from j9ac9k/implement-pr-336
fix-incorrect-tick-text-boundaries-calculation
2020-06-12 22:52:46 -07:00
Karl Georg Bedrich
3a758cac96
NEW options for LegendItem (#395)
* NEW options for LegendItem

* * changed 'drawFrame' into 'frame'
* added **kwargs to plotItem.addLegend
* added (frame=False, colCount=2) in legend example
* more elegant solution for legend.getLabel

* repaired getLabel
ItemSample.item == plotitem

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-12 22:40:20 -07:00
Ogi Moore
cee27b6268 fix-incorrect-tick-text-boundaries-calculation 2020-06-12 22:28:26 -07:00
Ogi Moore
e1f6c08365
Merge pull request #551 from bensondaled/develop
added fps class variable to ImageView to enable consistent playback f…
2020-06-12 21:55:46 -07:00
carmazine
8da7c166c8
Parameterize utcOffset during construction
Allows for control over timezone offset in a simple, optional manner
2020-06-12 22:46:09 +02:00
Ogi
001d91c2f2 Implement PR160 - clear current SpotItems 2020-06-11 22:56:20 -07:00
Ogi Moore
4b484ae46d
Merge pull request #150 from lidstrom83/ViewBox_panning_fix
Speed up ViewBox panning
2020-06-11 22:33:49 -07:00
Ogi Moore
b9a0fac815
devicePixelRatio is only accessible in __init__ 2020-06-11 21:32:12 -07:00
Ogi Moore
308bb8d1ff
Merge branch 'master' into develop 2020-06-11 21:11:51 -07:00
Ogi
4dc0865bae Restore the now-deprecated PlotWindow and ImageWindow classes 2020-06-11 20:55:28 -07:00
Ogi Moore
12a7c449f1
Give ability to hide/show individual spots (#1245)
Co-authored-by: dlidstrom <lidstrom83@gmail.com>
2020-06-10 23:31:39 -07:00
Ogi Moore
dbdd5d9a39
Peque scatter symbols (#1244)
* Added arrow symbols for the ScatterPlotItem

* Fixed arrows rotation in scatter plots

* Added new symbols to example

Co-authored-by: Miguel Sánchez de León Peque <msdeleonpeque@gmail.com>
2020-06-10 23:03:43 -07:00
Ogi
05f8921555 Implement suggested changes in PR 143 2020-06-10 20:50:04 -07:00
Ogi Moore
79ce0c46b5
Merge pull request #1242 from j9ac9k/implement-PR-142-with-changes
Emit the event with sigClicked in PlotCurveItem
2020-06-10 20:34:43 -07:00
Ogi
2e8dce2fc2 Emit the event with sigClicked in PlotCurveItem 2020-06-10 20:08:34 -07:00
Ogi Moore
1f00578cf1
Merge pull request #157 from lidstrom83/GradientWidget_widgetGroupInterface
Provide widgetGroupInterface to GradientWidget
2020-06-10 20:02:38 -07:00
Maurice van der Pot
e18af48b8d
Implement headWidth parameter for arrows (#385)
Although the documentation used to say that specifying tipAngle would
override headWidth, headWidth was never used. The new behaviour is that
tipAngle will be used, with a default value of 25, unless headWidth is
specified.

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-09 22:04:29 -07:00
Ogi Moore
517adc87c0
Merge branch 'master' into develop 2020-06-09 20:56:51 -07:00
Ogi Moore
f7127c0bc7
Merge branch 'master' into patch-1 2020-06-09 20:21:46 -07:00
Ogi Moore
b52809d879
Merge pull request #1240 from pyqtgraph/develop
Reset self._needsUpdate in GLImageItem after updating
2020-06-09 20:12:43 -07:00
Karl Georg Bedrich
2848d451f6
draw connector lines between gradient and region with anti-aliasing (#496)
Co-authored-by: serkgb <serkgb@J873GY1-2.stf.nus.edu.sg>
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-08 23:33:12 -07:00
Ogi Moore
b12f9174bc
Merge pull request #389 from ales-erjavec/scroll-phase-fix
Revert "ignore wheel events in GraphicsView if mouse disabled"
2020-06-08 23:22:04 -07:00
alfon_news
fc7921100e
Fix siScale imprecision errors (#508)
* Fix siScale imprecision errors

* Implement 2xB suggested change

Co-authored-by: Alberto Fontán Correa <afontan@com.uvigo.es>
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-08 22:51:14 -07:00
Ogi
66d8943317 PlotItem doesn't add item if already there 2020-06-08 21:50:29 -07:00
Ogi Moore
8fce6c6ad8
Merge pull request #345 from fschill/develop
performance improvement of GLImageItem
2020-06-08 21:40:28 -07:00
Kyle Sunden
e1f2cdce74 Final preparations for 0.11.0 release
Intend to tag and upload after this is merged
2020-06-08 18:25:45 -05:00
Ogi Moore
5b5749aa0b Revert "changed structure to redefine axis via plotitem.setAxes (#391)"
This reverts commit bb21791c71.
2020-06-07 20:29:28 -07:00
Kenneth Lyons
120d251a25 Minor improvements to LegendItem.
- Adds doc strings for user-facing methods so they appear in the
  documentation.
- Allows PlotItem.addLegend to accept the same arguments as LegendItem
  constructor for convenience.
- Fixes a bug for adding a BarGraphItem (which doesn't have an antialias
  option) to LegendItem
2020-06-06 15:56:01 -07:00
2xB
78929adbea ParameterItem: self.param.opts -> opts
Using `opts` as alias for `self.param.opts`, following the style of `updateFlags`.
2020-06-06 16:04:05 +02:00
2xB
d86bb65520 ParameterTree: Fix custom context menu
This issue was introduced in merging develop into #1175.
While refactoring for the merge, the change in namespace was not
correctly attributed, leading to the parameter `opts` to be assumed
in local namespace when it isn't.
2020-06-06 15:52:55 +02:00
Ogi Moore
ffc271d6c7
Merge pull request #1203 from meganbkratz/imageAxisOrder_bugfix
Image axis order bugfix
2020-06-05 21:36:00 -07:00
Ogi
c0b9bfa040 Remove commented out line 2020-06-05 21:00:18 -07:00
Ogi Moore
d282f8aba8
Remove workaround for memory leak in QImage (#1223)
Co-authored-by: Ognyan Moore <omoore@sensoryinc.com>
2020-06-05 20:57:20 -07:00
Ogi Moore
47f06e78be
Merge branch 'develop' into pyside2-uic 2020-06-03 21:48:16 -07:00
Ogi
3ed8c49599 test_loadUiType should run on 5.14.2.2 2020-06-03 21:22:01 -07:00
Ogi
f8c107e7b2 Do not emit loadUiType warning for pyside2 5.14.2.2 2020-06-03 20:18:17 -07:00
Ogi Moore
0e62913b88
Merge pull request #1222 from campagnola/spw-fix
py3 fix for ScatterPlotWidget.setSelectedFields
2020-06-01 19:16:43 -07:00
Luke Campagnola
ed36a0194b py3 fix for scatterplotwidget.setselectedfields 2020-06-01 18:38:50 -07:00
Karl Georg Bedrich
ca9b0c7910
new method 'getAxpectRatio' with code taken from 'setAspectLocked' (#392)
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-01 11:24:18 -07:00
Adam Strzelecki
983cc1695e
Patch/window handling (#468)
* Do not wrap PlotView/ImageView

There is no need to wrap PlotView/ImageView into QMainWindow, since
only purpose of the QMainWindow is some default menu toolbar & menu
handling, that is not used by PyQtGraph anyway.

Moreover, every parent-less Qt widget can become window, so this
change just use PlotView/ImageView as windows, removing extra
complexity, eg. method forwarding, self.win property.

Another benefit of this change, it that these windows get initial
dimensions and titles as they were designed in .ui file.

* Properly cleanup on ImageView.close()

We should not close explicitly child widgets or clear scene, otherwise
Qt will deallocate children views, and cause "wrapped C/C++ object of
type ImageItem has been deleted" error next time we call close()
and/or some other methods.

All children, including self.ui.roiPlot, self.ui.graphicsView will be
closed together with its parent, so there is no need to close them
explicitly.

So the purpose of close it to reclaim the memory, but not to make the existing ImageView object dysfunctional.

* Remove references to plot & image windows after close

PyQtGraph images and plots module list variables are currently holding
references to all plots and image windows returned directly from main
module. This does not seem to be documented however, and causes the Qt
windows to be not released from memory, even if user releases all own
references.

This change removes the references from images/plots list once window
is closed, so when there is no other reference, window and all related
memory is reclaimed.

* Change all UI forms title from Form to PyQtGraph

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-01 11:23:18 -07:00
Karl Georg Bedrich
bb21791c71
changed structure to redefine axis via plotitem.setAxes (#391)
* changed structure to redefine axis via
plotitem.setAxes

* cleanuup

* remove old axesitems before adding new ones

* DEBUGGED plotitem.setAxes
NEW AxisItem.setOrientation (needed by plotitem.setAxes)
show/hide right axes after .setAxes()

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-01 11:12:52 -07:00
Karl Georg Bedrich
68b8dbac1a
moved some functionality from method 'export' to new method (#390)
* moved some functionality from method 'export' to new method
'getSupportedFormats' making it accessible from outside
2020-06-01 11:05:39 -07:00
Ogi Moore
b64984b321
Merge pull request #151 from lidstrom83/custom_PlotItem_for_PlotWidget
Optionally provide custom PlotItem to PlotWidget
2020-05-31 21:05:59 -07:00
Ogi Moore
a27506209b
Merge pull request #393 from radjkarl/gradient
NEW show/hide gradient ticks NEW link gradientEditor to others
2020-05-31 21:03:27 -07:00
Zach Lowry
c903546679
Fix duplicate menus in GradientEditorItem (#444)
* Fix duplicate menus in GradientEditorItem

Add call to ev.accept in Tivk.mouseClickEvent to prevent parent menu from opening on a right click of a Tick.

Co-authored-by: Ogi <ognyan.moore@gmail.com>
2020-05-31 17:39:51 -07:00
Ogi Moore
c2cc92da52
Merge pull request #507 from alfonnews/Fix_Dock_Close_Event_QLabel_still_running
Fix Dock close event QLabel still running with no parent
2020-05-31 00:50:15 -07:00
Alberto Fontán Correa
1f9ccccfd0 Fix Dock close event QLabel still running with no parent 2020-05-31 00:26:19 -07:00
ChristophRose
ed009d3779 Check lastDownsample in viewTransformChanged
Add a check in the viewTransformChanged function to only force a rerender when the downsampling factor changed.
Previously simply moving the image around or zooming in/out without changing the downsampling factor would force a complete rerendering of the image, which was very slow with large images. This way, the expensive rerender is only forced if necessary.
2020-05-30 22:15:52 -07:00
Ogi
173a755b6c Encode csv export header as unicode 2020-05-30 21:13:20 -07:00
Paul Müller
e08ac110f5
pretty-print log-scale axes labels (#1097)
* pretty-print log-scale axes labels

* only pretty-print in python 3
2020-05-30 13:53:38 -07:00
Israel Brewster
949df4da16
Fix aspectRatio and zoom range issues when zooming (#1093)
* Check and enforce view limits in the setRange function

* Check limits when setting aspectRatio

- This change is required due to moving the limit checking out of the updateViewRange function.
- If the original logic remained, aspect ratio could be lost due to "squshing" the requested view into the viewBox

* Add tests for ViewBox zooming limits and aspect ratio

* - Move test code to proper location and fix instantiation of QApplication

Co-authored-by: Israel Brewster <ijbrewster@alaska.edu>
2020-05-30 13:09:09 -07:00
Ogi Moore
2ac1eefeb5
Merge pull request #1173 from 2xB/fix-1136-2
GraphicsLayout: Always call layout.activate() after adding items
2020-05-30 13:04:37 -07:00
2xB
7672b5b725
Fix: Parameter tree ignores user-set 'expanded' state (#1175)
* Fix: Parameter tree ignores user-set 'expanded' state

When setting the 'expanded' state of parameters, this change is not applied
in the graphically visible tree. This commit changes that behaviour by
adding a clause in `ParameterItem.optsChanged` to react to that.

Fixes #1130

* ParameterTree: Add option to synchronize "expanded" state

As seen in #1130, there is interest in synchronizing the "expanded" state
of `Parameter`s in `ParameterTree`s. As a default, this would lead to
users being forced to always have multiple `ParameterTree`s to be
expanded in the exact same way. Since that might not be desirable, this
commit adds an option to customize whether synchronization
of the "expanded" state should happen.

* Fix: Sync Parameter options "renamable" and "removable" with ParameterTrees

Currently, `Parameter` options `renamable` and `removable` are only considered
when building a new `ParameterTree`. This commit makes changes in those
options reflected in the corresponding `ParameterItem`s.

* ParameterTree: Reflect changes in Parameter option 'tip'

* Parameter: When setting "syncExpanded", update "expanded" state directly

Co-authored-by: 2xB <2xB@users.noreply.github.com>
2020-05-30 13:01:39 -07:00
Ogi Moore
03b8385e62
Merge pull request #1218 from campagnola/ptree-fix
Fix ParameterTree.clear()
2020-05-30 13:00:10 -07:00
Luke Campagnola
7d979bcf94 Check for missing ptree widget before accessing 2020-05-30 09:30:36 -07:00
Christian Clauss
2a6f3f0193
import numpy as np for lines 44 and 51 (#1161)
* import numpy as np for lines 44 and 51
2020-05-30 08:09:25 -07:00
Ogi Moore
b03de3be9c
Merge pull request #1216 from erikmansson/add-maprectfromview-cache
Add cache for mapRectFromView
2020-05-30 08:07:07 -07:00
Erik Månsson
55e1f2c520 Add cache for mapRectFromView 2020-05-30 16:25:43 +02:00
Ogi
dfe83dc1c8 Skipping this test on python 5.9 configs 2020-05-30 07:15:46 -07:00
Luke Campagnola
9d1fbb6a3e 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
patricev
3f6424cc57
Update Data.py (#1071)
* Update Data.py

Python eval not working with python 3 - bug fix with the exec() part
2020-05-29 23:38:03 -07:00
christuart
ddb597a3dd
Fix selection of FlowchartWidget input/output nodes from issue #808 (#809)
Co-authored-by: Chris Stuart <chris.stuart@ukaea.uk>
2020-05-29 23:35:58 -07:00
Ogi Moore
be6f28b03c
Merge pull request #1090 from paulmueller/export-dialog-improvements
dump ExportDialog.exporterParameters
2020-05-29 23:11:46 -07:00
Daniel Hrisca
6194245322
improve SymbolAtlas.getSymbolCoords and ScatterPlotItem.plot performance (#1198) 2020-05-29 23:08:40 -07:00
Ogi Moore
99c43613f3
Merge pull request #1174 from Ma-Shell/develop
Fixed a possible race condition with linked views
2020-05-29 23:00:10 -07:00
Ogi Moore
b83563408c
Merge pull request #1206 from markobausch/develop
Added context menu option to parametertree
2020-05-29 22:55:19 -07:00
Erik Månsson
369d7a11d2 Fix PixelVectors cache 2020-05-28 23:10:00 +02:00
Luke Campagnola
d1c384876c Remove junk code 2020-05-28 13:32:24 -07:00
Luke Campagnola
6a76f40869 Add support for running pyside2-uic binary to dynamically compile ui files 2020-05-28 11:59:31 -07:00
Ogi Moore
35128d404a
Merge pull request #1168 from 2xB/fix-788
GroupParameterItem: Did not pass changed options to ParameterItem
2020-05-27 07:32:17 -07:00
Marko Bausch
4052f0dd11 Added context menu option to paramtree 2020-05-22 16:05:52 +02:00
Megan Kratz
ca2e5849c2 better conditional handling so as not to break something that was working before 2020-05-19 15:25:15 -06:00
Megan Kratz
360bcad47b fix for mismatched axis exception when imageAxisOrder='row-major' 2020-05-19 15:12:09 -06:00
Megan Kratz
c349c3665b fix for roi getting wrong data when imageAxisOrder='row-major' 2020-05-19 15:11:11 -06:00
Ogi Moore
c715c5ac28
Merge pull request #1201 from pyqtgraph/rtd_build
Get readthedocs working
2020-05-18 14:58:05 -07:00
Kenneth Lyons
5353acdb1c Static paths not used for docs. Fix malformed table in docstring 2020-05-16 10:12:33 -07:00
Chris Billington
9a9be68d90
mkQApp: Use sys.argv if non-empty and always set given name (#1199)
Always pass `sys.argv`, if non-empty, to `QApplication` constructor.
This allows code to continue to rely on the fact that the application
name is by default set from `sys.argv[0]`, which is important for
example on Linux where this determines the WM_CLASS X attribute used by
desktop environments to match applications to their launchers.

If `sys.argv` is empty, as it is in an interactive Python session, pass
`["pyqtgraph"]` in its place as a sensible default for the application
name, which causes issues if not set (issue #1165).

If a `name` is given, set it using `setApplicationName()` instead of via
the argument list. This ensures it will be set even if the singleton
`QApplication` already existed prior to calling `mkQApp()`.
2020-05-15 11:31:42 -07:00
Kyle Sunden
fb56d3eaa9
Merge pull request #801 from ales-erjavec/remove-address-cache
Remove use of GraphicsScene._addressCache in translateGraphicsItem
2020-05-11 10:38:39 -05:00
Maxim Millen
14075e6223
Added support for plot curve to handle both fill and connect args. (#1188) 2020-05-10 08:42:04 -07:00
Kenneth Lyons
5bebf697b0
Disable remove ROI menu action in handle context menu (#1197) 2020-05-10 08:39:17 -07:00
2xB
720fa5f3c2
DateAxisItem: AxisItem unlinking tests and doc fixed (#1179)
* Added test_AxisItem by @mliberty1

As found in https://github.com/pyqtgraph/pyqtgraph/pull/917

* test_AxisItem: Fit to current implementation

* DateAxisItem: Fix documentation to zoomLevels

zoomLevels is not intended to be set by the user (see discussion in converstation from
https://github.com/pyqtgraph/pyqtgraph/pull/1154/files#diff-aefdb23660d0963df0dff3a116baded8
). Also, `zoomLevelWidths` does currently not exist.
This commit adapts the documentation to reflect that.

* DateAxisItem: Do not publish ZoomLevel

* DateAxisItem testing: Removed unnecessary monkeypatch fixture

Co-authored-by: 2xB <2xB@users.noreply.github.com>
2020-05-05 09:16:07 -07:00
2xB
96be1bd23f
Fix: AxisItem tickFont is defined in two places while only one is used (#1180)
To set the tick font of `AxisItem`s, there are two options:
`setStyle({"tickFont":...})` and `setTickFont(...)`.
The first option sets `AxisItem.style['tickFont']`, the second
sets `self.tickFont`. Only `self.tickFont` is actually used.
This PR replaces all occurrences of the second variable with the first
variable, so both options work again. Also, documentation from
`setStyle` is copied to `setTickFont`.

Co-authored-by: 2xB <2xB@users.noreply.github.com>
2020-05-04 14:58:29 -07:00
Daniel Hrisca
f7364f52b3
improve SymbolAtlas.getSymbolCoords performance (#1184)
* remote legacy work-around for old numpy errors

* forgot to remove the numpy_fix import

* require numyp >= 1.8.0

* improve performance of updateData PlotCurveItem (saves about 2us per call)

* improve ScatterPlotItem performance
2020-05-04 13:42:03 -07:00
Ales Erjavec
02b7532706 Remove use of GraphicsScene._addressCache in translateGraphicsItem
Use QGraphicsItem.toQGrapicsObject on the item instead.

This probably is not even needed since PyQt 4.9
2020-05-01 13:05:51 +02:00
Lev Maximov
a76d9daec2
Date axis item (#1154)
* Add DateAxisItem

* Change style to camelCase

* Fix missing first tick for negative timestamps

* Add ms precision, auto skipping

Auto skipping allows a zoom level to skip ticks automatically if the
maximum number of ticks/pt is exceeded

* fixes suggested by @goetzc

* workaround for negative argument to utcfromtimestamp on windows

* attachToPlotItem method

* default date axis orientation

* Use new DateAxisItem in Plot Customization example

* attachToPlotItem bugfix

* examples of DateAxisItem

* modified description of customPlot example

* added descriptions to the new examples, reformatted their code, included the first one into utils.py

* typo

* Refactored code for setting axis items into new function

Replaces "DateAxisItem.attachToPlotItem"

* Fix string comparison with ==

* Doc: Slightly more text for DateAxisItem, small improvement for PlotItem

* Make PlotWidget.setAxisItems official

* Fix typo in docstring

* renamed an example

* merge bug fix

* Revert "merge bug fix"

This reverts commit 876b5a7cdb.

* Real bug fix

* support for dates upto -1e13..1e13

* Automatically limit DateAxisItem to a range from -1e12 to 1e12 years

Very large years (|y|>1e13) cause infinite loop, and since nobody
needs time 100 times larger than the age of the universe anyways,
this constrains it to 1e12.

Following suggestion by @axil:
https://github.com/pyqtgraph/pyqtgraph/pull/1154#issuecomment-612662168

* Also catch ValueErrors occuring on Linux before OverfloeErrors

While zooming out, before hitting OverflowErrors, utctimestamp
produces ValueErrors (at least on my Linux machine), so they
are also catched.

* Fix: Timestamp 0 corresponds to year 1970

For large years, x axis labels jump by 1970 years if it is not
accounted for timestamp 0 to be equal to year 1970.

* Fix: When zooming into extreme dates, OSError occurs

This commit catches the OSError like the other observed errors

* Disable stepping below years for dates outside *_REGULAR_TIMESTAMP

2 reasons: First: At least on my Linux machine, zooming into
those dates creates infinite loops. Second: Nobody needs
sub-year-precision for those extreme years anyways.

* Adapt zoom level sizes based on current font size and screen resolution

This is somewhat experimental. With this commit, no longer 60 px are
assumed as width for all zoom levels, but the current font and
display resolution are considered to calculate the width of ticks in
each zoom level. See the new function `updateZoomLevels` for
details.
Before calling this function, overridden functions `paint` and
`generateDrawSpecs` provide information over the current display
and font via `self.fontScaleFactor` and `self.fontMetrics`.

* Meaningful error meassage when adding axis to multiple PlotItems

As @axil noted in the DateAxisItem PR, currently users get a
segmentation fault when one tries to add an axis to multiple
PlotItems. This commit adds a meaningful RuntimeError message
for that case.

* setZoomLevelForDensity: Refactoring and calculating optimal spacing on the fly

* DateTimeAxis Fix: 1970 shows when zooming far out

* Refactoring: Make zoomLevels a customizable dict again

* updated the dateaxisitem example

* Fix: Get screen resolution in a way that also works for Qt 4

This is both a simplification in code and an improvement in backwards compatibility with Qt 4.

* DateAxisItem Fix: Also resolve time below 0.5 seconds

* unix line endings in examples

* DateTimeAxis Fix: For years < 1 and > 9999, stepping broke

Stepping was off by 1970 years for years < 1 and > 9999,
resulting in a gap in ticks visible when zooming out. Fixed by
subtracting the usual 1970 years.

* DateTimeAxis Fix: Zooming out too far causes infinite loop

Fixed by setting default limits to +/- 1e10 years. Should still
be enough.

* improved second dateaxisitem example

* 1..9999 years limit

* DateTimeAxis: Use OrderedDict to stay compatible with Python < 3-6

* DateAxisItem: Use font height to determine spacing for vertical axes

* window title

* added dateaxisitem.rst

* updated index.rst

Co-authored-by: Lukas Heiniger <lukas.heiniger@sed.ethz.ch>
Co-authored-by: Lev Maximov <lev.maximov@gmail.com>
Co-authored-by: 2xB <2xB@users.noreply.github.com>
2020-04-27 11:43:22 -07:00
Marcel Schumacher
a697b5584a Fixed a possible race condition with linked views 2020-04-14 17:24:54 +02:00
2xB
ec66c34fc9 GraphicsLayout: Always call layout.activate() after adding items
Items added to a `GraphicsLayout` only learn their size information
after the internal `QGraphicsGridLayout` recalculates the layout.
This is happening as a slot in the Qt event queue.
Not having updated geometry bounds directly after adding an item
leads to multiple issues when not executing the Qt event loop
in time (see below). This commit fixes that by always calling
`layout.activate()` after adding items, updating item sizes
directly.

This is a follow-up to PR #1167, where introducing a direct call to
`processEvents` was suspected to be able to cause side effects.

Notifying @j9ac9k and @campagnola, as they were involved in #1167.

Fixes #8
Fixes #1136
2020-04-14 02:00:49 +02:00
Kenneth Lyons
a703155a21 Replace default list arg with None 2020-04-11 20:15:00 -07:00
2xB
4f1bf8bb18 GroupParameterItem: Did not pass changed options to ParameterItem
`ParameterItem` handles visibility changes in `optsChanged`.
`GroupParameterItem` overrides this function, but never calls
the super function, leading in visibility changes not being
applied. This PR fixes this by calling said function.

Fixes #788
2020-04-12 02:47:23 +02:00
2xB
be1ed14bd0 pg.mkQApp: Pass default application name to Qt, added documentation 2020-04-12 00:43:16 +02:00
Ogi Moore
6f4048596b
Merge pull request #1156 from 2xB/2xb-fix-1155
SVGExporter: Correct image pixelation.
2020-04-09 07:52:46 -07:00
2xB
71636e3518 Fix: Update axes after data is set 2020-04-08 17:11:20 +02:00
2xB
1e81f3dad0 SVGExporter: Correct image pixelation. 2020-04-08 01:14:36 +02:00
Ogi Moore
88931bc4a5
Merge pull request #1152 from ixjlyons/fnanfix-test
Fnanfix test
2020-04-03 18:39:10 -07:00
Kenneth Lyons
988e5c1222 Test makeARGB with nans 2020-04-03 17:56:38 -07:00
Jan Kotanski
6f34da586d remove second nanMask = np.isnan(data) 2020-04-03 17:56:38 -07:00
Jan Kotanski
daeacad71f Make nanMask compatible with 3D data 2020-04-03 17:56:11 -07:00
Jan Kotanski
61967bd7f7 add nanfix 2020-04-03 17:49:34 -07:00
lcmcninch
a5dd549be1
Pass showAxRect keyword arguments to setRange to allow caller to set padding, etc. (#1145)
Co-authored-by: Luke McNinch <lucas.c.mcninch.civ@mail.mil>
2020-04-03 15:33:21 -07:00
Kenneth Lyons
db67a256a9
Miscellaneous doc fixups (#1142)
* Miscellaneous doc cleanup

* Moved dockarea up a level (like flowchart, parametertree). Removed extraneous parametertree doc
2020-04-03 10:06:25 -07:00
Ogi Moore
7cbc703449
Merge pull request #1151 from ixjlyons/imageexporter-tests
ImageExporter py2-pyside fix with test
2020-04-03 09:46:45 -07:00
Kenneth Lyons
3ba76475d4 Added ImageExporter test for py2-pyside fix 2020-04-03 09:30:23 -07:00
Ogi Moore
a8d1a84870
Merge pull request #1063 from ales-erjavec/view-box-enable-menu-fix
Fix: AttributeError in ViewBox.setEnableMenu
2020-03-06 16:16:14 -08:00
Ogi Moore
93f8ee9f0a
Merge pull request #1111 from JoeXinfa/add-label
Add name label to GradientEditorItem
2020-03-06 15:30:57 -08:00
Ogi Moore
f61d38ba8b
Merge pull request #1110 from jkotan/nextafter2
fix for makeARGB error after #955
2020-03-06 13:32:11 -08:00
Ogi Moore
5cd19ba7a0
Merge pull request #1139 from SamSchott/patch-1
Bug fix in LegendItem for `setPen`, `setBrush` etc
2020-03-06 11:26:48 -08:00
SamSchott
3509d79c0f
bug fix for setPen, setBrush, ...
Fixes a bug where `setPen`, `setBrush` and `setLabelTextColor` would fail because they call `LegendItem.paint` without a pen. They should instead call `LegendItem.update`.
2020-03-06 15:02:39 +00:00
Unknown
6985be2a6f replaced incompatible string construction 2020-03-01 17:46:01 +01:00
Ogi
3158c5b4db Use int() instead of .__int__() 2020-02-29 14:38:19 -08:00
Ognyan Moore
6ed8a405fe Address FutureWarning about implicit float to int conversions 2020-02-28 14:27:10 -08:00
Ognyan Moore
7199a4f4ce deepcopy(dict) does not necessarily preserve insertion order 2020-02-28 14:25:34 -08:00
Ognyan Moore
3195ed4c8f Skip some tests on pyside2 2020-02-26 10:06:02 -08:00
Ogi
19ae94765f Skip tests involving loadUi with pyside2 5.14 2020-02-24 23:00:42 -08:00
Ogi
428af4950d unskip py3 tests, weakref works fine in a list 2020-02-24 23:00:09 -08:00
Ognyan Moore
f0d1c4eda1 Skipping problematic test on py2/qt4/linux 2020-02-24 22:30:27 -08:00
Xinfa Joseph Zhu
660ac675f1 Fix typo bug 2020-01-09 15:23:49 -06:00
Jan Kotanski
65d2ac58e0 fix for nextafter 2020-01-08 21:19:09 +01:00
Kenneth Lyons
61104cd43c Fix small oversight in LegendItem 2019-12-24 10:04:31 -08:00
Paul Müller
57909aab45
dump ExportDialog.exporterParameters, b/c it prevents correct aspect ratio on image export (close #1087) 2019-12-03 11:52:09 +01:00
Ogi Moore
db483f8ec2
Merge pull request #1082 from pyqtgraph/revert-360-develop
Redo "Allow MetaArray.__array__ to accept an optional dtype arg"
2019-11-25 06:52:44 -08:00
Paul Müller
2a01c3848a
fix wrong offset when drawing symbol 2019-11-25 14:14:15 +01:00
Paul Müller
b02ada024b
fix error on SVG export of scatter plots: KeyError: 'resolutionScale' 2019-11-23 13:10:49 +01:00
Ognyan Moore
ef4ca9e9ea Incorporated correction luke suggested 2019-11-21 08:46:25 -08:00
Ogi Moore
770ce06dc1
Revert "Allow MetaArray.__array__ to accept an optional dtype arg" 2019-11-21 08:42:44 -08:00
Ogi Moore
78e218fe6c
Merge pull request #360 from nfirvine/develop
Allow MetaArray.__array__ to accept an optional dtype arg
2019-11-20 22:17:18 -08:00
Ogi Moore
71c4807559 fix dict eq() checks 2019-11-20 21:54:56 -08:00
Ogi Moore
477feb777b import h5py.highlevel is deprecated, use import h5py instead 2019-11-20 21:54:56 -08:00
Luke Campagnola
a8529e48f3 faster keys comparison 2019-11-20 21:54:56 -08:00
Luke Campagnola
7cb27594a5 fix dict keys comparison 2019-11-20 21:54:56 -08:00
Luke Campagnola
542f4b446b Add eq() support for comparing dict, list, tuple 2019-11-20 21:54:56 -08:00
Luke Campagnola
e58b7d4708 minor correction 2019-11-20 21:54:56 -08:00
Luke Campagnola
c484c86417 don't modify info from v1 files, move info correction to hdf reading 2019-11-20 21:54:56 -08:00
Paul B. Manis
ae61d3582e Py2/3 MetaArray adjustments, first pass 2019-11-20 21:54:56 -08:00
SamSchott
c0ae44bc2d Nicer legend (#958)
* More customizable and nicer legend.

- Give kwargs for legend frame and background colors instead of hard-coded values.
- Reduce spacing for more compact legend
- Give separate kwarg `labelTextColor`.
- New method to clear all legend items.
- New methods to get and change `offset` relative to the legend's parent.
- Horizontal instead of tilted lines for legend pictures.
2019-11-19 21:42:31 -08:00
SamSchott
c95ab570b1 set color of tick-labels separately (#841) 2019-11-19 20:43:27 -08:00
rwalroth
455fdc2a2a Allowed actions to diplay title instead of name (#1069)
ActionParameterItem changed so that if there is
a title it will be displayed, otherwise displays name.
2019-11-19 20:05:45 -08:00
boylea
b1b2f4662b Fixed image scatter plot export bug (#88) 2019-11-19 20:03:15 -08:00
Paul Müller
267a0af8e7 Reset currentRow and currentCol on clear (#1076) 2019-11-19 08:21:36 -08:00
Ogi Moore
60c760a2e0
Add RemoteGraphicsView to __init__.py (#1066) 2019-11-19 08:15:27 -08:00
Daniel Hrisca
15a1f5af94 improve performance of updateData PlotCurveItem (saves about 2us per call) (#1079)
* improve performance of updateData PlotCurveItem (saves about 2us per call)
2019-11-19 08:14:53 -08:00
Kenneth Lyons
ec445e7601 HDF5Exporter handling of ragged curves with tests (#1072)
* HDF5Exporter handles ragged curves by saving them into different datasets based on their names.

* Add HDF5Exporter tests

* Document HDF5Exporter

* Fix tmp file path
2019-11-12 09:01:49 -08:00
Kenneth Lyons
faef56c3e7 Qulogic py3 fixes (#1073)
* py3k: Remove reduce calls.

* py3k: Remove compatibility sortList function.

Sorting by key has existed since Python 2.4.

* Remove unnecessary sys.path manipulation.

This file doesn't have any __main__ code to run anyway.

* Use context manager
2019-11-12 08:45:42 -08:00
Kenneth Lyons
f5e25622a7 Validate min/max text inputs in ViewBoxMenu (#1074) 2019-11-12 08:36:16 -08:00
Ales Erjavec
a65b8c91f7 Add simple test for setEnableMenu 2019-11-06 10:59:51 +01:00
Ales Erjavec
50cf2f561f Move common code to _applyEnableMenu 2019-11-06 10:58:00 +01:00
Jan Kotanski
6848824557 add bookkeeping exporter parameters (#1023) 2019-11-02 22:00:06 -07:00
Eugene Prilepin
b1df230964 Remove 'global' for CONFIG_OPTIONS because it is redundant for dict (#1055) 2019-11-02 21:51:20 -07:00
wuyuanyi135
cb4d9b23b2 fix flowchart context menu redundant menu (#1060) 2019-11-02 21:36:58 -07:00
Ales Erjavec
a84953530f Fix: setEnableMenu in ViewBox 2019-10-28 14:30:22 +01:00
Agamemnon Krasoulis
f2740f7e69 Fix typo in documentation (#1062) 2019-10-22 09:45:45 -07:00
2xB
ed6586c7dd Removed unnecessary enlargement of bounding box (#1048) 2019-09-30 09:15:03 -07:00
Kenneth Lyons
61ec73a741 Close windows at the end of test functions (#1042)
* Close windows at the end of test functions

* Can't show window deletion warning during interpreter shutdown
starting
2019-09-27 13:37:40 -07:00
Mi!
071e429535 makeRGBA/ImageItem: Applying alpha mask on numpy.nan data values (#406)
* Applying alpha mask on numpy.nan data values

* Typesafe, checking for `data.dtype.kind`
2019-09-27 13:31:47 -07:00
2xB
96a4270a30 Fix HistogramLUTWidget with background parameter (#953)
* Fix HistogramLUTWidget with background parameter

HistogramLUTWidget cannot be initialized with the `background` parameter, because all parameters are also passed to the constructor of HistogramLUTItem which does not have a `background` parameter. This pull request fixes that issue by defining `background` explicitly as parameter in the function header.

Closes #175

* Added test for HistogramLUTWidget initialization with background

* Fixed Python2 compatibility

* Do not pg.exit() after test

* Moved test_histogramlutwidget to widget tests
2019-09-27 13:02:54 -07:00
Daniel Hrisca
aa3a5d3995 remote legacy work-around for old numpy errors (#1046)
* remote legacy work-around for old numpy errors

* forgot to remove the numpy_fix import

* require numyp >= 1.8.0
2019-09-26 10:08:43 -07:00
Kenneth Lyons
3ae58a065e
Merge pull request #1045 from ixjlyons/fix-525
Raise AttributeError in __getattr__
2019-09-25 17:57:12 -07:00
Kenneth Lyons
b57d45df6d The lazier way 2019-09-23 21:25:52 -07:00
Kenneth Lyons
ed264802a2 Raise AttributeError in __getattr__ 2019-09-23 21:19:01 -07:00
Kenneth Lyons
b7f1aa88cd Cast to int after division 2019-09-22 17:03:30 -07:00
lidstrom83
df28c41d4b Make DockArea compatible with Qt Designer (#158) 2019-09-13 23:08:28 -07:00
Aikhjarto
8c137a1caf fix: circular texture was slightly off-center (#1012) 2019-09-13 22:12:23 -07:00
Kenneth Lyons
c94b1cb99e Always update transform when setting angle of a TextItem (#970)
* Always update transform when setting angle of a TextItem

* Add test to check TextItem.setAngle

* Relax test a bit but still check that setAngle has an effect

* Add docstring to setAngle

* Remove unneeded numpy testing function imports
2019-09-13 22:04:48 -07:00
Kenneth Lyons
fc9768be3c
Merge pull request #356 from QuLogic/np-warnings
Fix some NumPy warnings
2019-09-12 22:36:55 -07:00
Elliott Sales de Andrade
2e90089890 Fix undefined reduce call. 2019-09-13 01:07:57 -04:00
Elliott Sales de Andrade
3edbef6c57 Ensure exported images use integer dimensions.
It seems that the parameter tree doesn't enforce the int type very
strongly.

Also, use some local variables more often.
2019-09-13 01:07:57 -04:00
2xB
061a30e827 Correctly include SI units for log AxisItems (#972) 2019-09-12 21:58:49 -07:00
2xB
bfd36dc203 Prevent element-wise string comparison (code by @flutefreak7) (#1024) 2019-09-12 21:30:39 -07:00
2xB
8309b53014 Fix: Reset ParentItem to None on removing from PlotItem/ViewBox (#1031) 2019-09-12 21:00:38 -07:00
miranis
e3884ebd20 Update GraphicsScene.py (#599)
In lines 174 and 191 cev[0] is being accessed when cev is an empty list. I get this error when inheriting from GraphicsLayoutWidget and overloading mouseDoubleClickEvent.
2019-09-12 20:24:48 -07:00
Jindřich Makovička
bbc11b96a9 Configurable GridItem tick spacing and pen color (#101) 2019-09-12 14:50:43 -07:00
Paul Debus
fd11e1352d fix encoding error in checkOpenGLVersion (#787) 2019-08-18 12:16:31 -07:00
2xB
80f8af2432 Use Qt5 QWheelEvent functions if necessary (#924)
* Make QWheelEvent code consistently compatible with Qt5

* Add documentation

* Removed old TODO message

* Init remote QWheelEvent only with relative position, minor code simplifications

* RemoteGraphicsView Renderer assumes to be at (0,0)

* Orientation serialized as boolean
2019-08-18 10:17:34 -07:00
Pepijn Kenter
3a863fff9a Fixes incorrect default value for scale parameter in makeARGB. (#793)
* Fix incorrect default value for scale paremter in makeARGB.

* update tests to pass with codebase change
2019-08-17 22:19:11 -07:00
2xB
31f1ae586b Fix: Allow wrapped GraphicsLayoutWidget to be deleted before its wrapping Python object (#1022) 2019-08-17 20:43:21 -07:00
2xB
ff30a82298 Fix: colormap: Support various arguments as color (#1014)
* colormap: Support various arguments as color

* Using mapping for speed and consistency (suggested by @j9ac9k)
2019-08-17 20:38:05 -07:00
2xB
b7b431de8d FIX: Curves are automatically set visible when one is deleted (#987)
* Do not automatically set all curves visible

* Improved array iteration in PlotItem.updateDecimation
2019-08-17 20:36:34 -07:00
2xB
d77ad273c7 Fix: Item on ViewBox causes duplicate paint calls (#1017)
* Fix: Item on ViewBox causes duplicate paint calls

* Assure call of ViewBox.updateMatrix on resizeEvent

* Fix: Disable autorange on "ViewBox.setRange" before updateAutoRange is called
(Called via updateViewRange -> update -> prepareForPaint)
2019-08-17 11:52:45 -07:00
2xB
05aa3e9393 Add 'fillOutline' option to draw an outline around a filled area (#999) 2019-08-17 09:57:40 -07:00
2xB
cd3f7fd68e Adding setter for GLGridItem.color (#992)
* adding option to set grid color on demand

* Update after setColor

* Made GLGridItem color attribute private

* Init GLGridItem color with fn.Color

* Added docstring
2019-08-17 09:55:55 -07:00
2xB
08c0de768b Warn if visible GraphicsView is garbage collected (#942)
* Warn if visible window is garbage collected

* (Py)Qt does not rely on Python GC

* Only warn if deleted widget has no parents (if it is a standalone window)

* Hide windows when closing

* Only implement GraphicsView.__del__ if it does not prevent circular reference garbage collection
2019-08-16 22:32:06 -07:00
Ogi Moore
7b70d66c6a
Merge pull request #974 from 2xB/fix-296-2
FIX: RecursionError when instanciating CtrlNode
2019-08-16 21:43:32 -07:00
Ogi Moore
67433a1451
Merge pull request #998 from 2xB/fix_461
Fix QtProcess proxy transmitting small multidimensional arrays
2019-08-16 21:21:46 -07:00
Ogi Moore
750ec5a1f9
Merge pull request #996 from kevinanewman/patch-1
Update LegendItem.py
2019-08-16 21:19:18 -07:00
Ogi Moore
b7a3237361
Merge pull request #1010 from Axel-Jacobsen/develop
BarGraphItem CSV/image export
2019-08-16 20:42:58 -07:00
Ogi Moore
9bb82a8af2
Merge pull request #1015 from 2xB/always_nparray
Always convert PlotDataItem data to NumPy array
2019-08-16 20:29:06 -07:00
Ogi Moore
273757fa4b
Merge pull request #1016 from 2xB/fix-862
Fix: ImageView sigTimeChanged was only emitted on mouse interaction
2019-08-16 20:28:02 -07:00
Ogi Moore
eb7baa3855
Merge pull request #1019 from 2xB/fix-1018
Fix: GLScatterPlotItem and GLImageItem initializeGL only executed once
2019-08-16 20:19:31 -07:00
2xB
8d2c16901b Merge master into develop (#981)
* Information is spelled with an r, even in comments
2019-08-16 20:16:01 -07:00
2xB
652ae9e64a Fix: GLScatterPlotItem and GLImageItem initializeGL only executed once 2019-08-15 02:41:51 +02:00
2xB
4e6629f352 Fix: ImageView sigTimeChanged was only emitted on mouse interaction 2019-08-08 17:39:11 +02:00
2xB
abd028436a Always convert PlotDataItem data to NumPy array 2019-08-08 16:58:28 +02:00
Axel Jacobsen
27d94cae92 enforce utf-8 encoding for casting QByteArray to str
remove print statements
2019-08-06 12:00:31 -07:00
Axel Jacobsen
18661cab0d BarGraphItem CSV export and documentation 2019-08-06 09:32:43 -07:00
2xB
a655e974ff Call multiprocess.connection.Connection.send_bytes with bytes 2019-07-20 20:33:11 +02:00
Kevin Newman
6648db031e
Update LegendItem.py
Propose adding a clear() method (or equivalent) for easier legend re-use with dynamically updated plots...
2019-07-17 08:37:16 -04:00
Daniel Hrisca
73c440a4db remove deprecated call to time.clock (#980)
remove deprecated call to time.clock for python3
2019-07-02 07:01:32 -04:00
Luke Campagnola
138fdd0af2 relax image comparison for failing windows test (#979)
relax image comparison for failing windows test
2019-07-02 06:57:45 -04:00
Luke Campagnola
cff9cfa98d Reduce test window size for OSX compatibility 2019-07-01 19:00:18 -07:00
Luke Campagnola
dc9aa84ce3 Add a faster method for computing pseudoscatter 2019-07-01 18:30:00 -07:00
Ogi Moore
04114fa126
Merge pull request #968 from ecejeff/unit-label-fix
Fix for AxisItem using old scale to create label
2019-07-01 07:01:05 -07:00
2xB
a4cecf4a22 Call parent __init__ as soon as possible for CtrlNode 2019-06-30 17:50:11 +02:00
Fernando
caf7378f38 FIX: fix disconnect method of SignalProxy class. 2019-06-28 10:59:03 -03:00
Billy SU
23b4e174f0 Add Dock test and remove outdated comments (#659)
* Add test for Dock closable arg

* Remove outdated and debug comments

* Add test for hideTitle dock
2019-06-27 21:51:54 -07:00
2xB
c37956b29a Corrected documentation for heightColor shader 2019-06-28 01:51:20 +02:00
Ogi Moore
18bfee3462
Merge pull request #333 from ombschervister/legend_fix
fix legendItem drag
2019-06-27 14:44:55 -07:00
Jeffrey Nichols
d9f0da5a7c
Fix for AxisItem using old scale to create label 2019-06-27 14:45:37 -04:00
Ogi Moore
82d690e08d
Merge pull request #321 from espdev/fix-issue316
Fixing the border rect overlapping for ViewBox and GraphicsLayout
2019-06-26 22:33:21 -07:00
Ogi Moore
7f327329f4
Merge pull request #840 from OE-FET/patch-3
Clipping: don't assume that x-values have uniform spacing
2019-06-26 22:29:31 -07:00
Ogi Moore
78df356c74
Merge pull request #962 from j9ac9k/ixjlyons-fix-exit-oserror
fix-exit-oserror
2019-06-26 00:00:50 -07:00
Kenneth Lyons
26963ffbc4 Fix pg.exit test in case pyqtgraph is not installed 2019-06-25 23:20:28 -07:00
Kenneth Lyons
55d9e8888b Allow last image in stack to be selected by slider in ImageView 2019-06-25 16:46:01 -07:00
Dschoni
cd2b16dbae
Merge pull request #782 from spauka/fix_fforward_spin
Terminate FileForwarder thread on process end
2019-06-25 17:04:53 +02:00
Ogi Moore
f3ab88001d
Merge pull request #960 from ixjlyons/fix-busycursor-pyside
Work around PySide setOverrideCursor bug in BusyCursor
2019-06-24 16:04:37 -07:00
Kenneth Lyons
8067ee25d5 Work around PySide setOverrideCursor bug in BusyCursor 2019-06-24 15:39:12 -07:00
fake-name
8fa6410382 Moar dumb typos. I managed to totally bugger up the rebase. 2019-06-24 14:14:04 -07:00
fake-name
14925b7fe3 Gah, forgot to add this. 2019-06-24 14:11:54 -07:00
fake-name
3f71276ac3 Fix more mkPen invocations that got added for some reason. 2019-06-24 14:02:19 -07:00
fake-name
18999c2ca1 Consolidate to simpler get is not none check. 2019-06-24 14:01:53 -07:00
Connor Wolf
17e90af36c Avoid constructing shadow pens when no shadow pen is set
Basically, profiling has pointed me to the fact that a fair bit of code time is spent in `setShadowPen()` (actually, it's in `mkPen()`, which `setShadowPen()` calls), even when no shadow pen is specified.

In my application, I'm calling `pyqtgraph.PlotDataItem.setdata()`, which calls through PlotDataItem->setData, PlotDataItem->updateItems. At some point in the call stack, the default value for `shadowPen` is being inserted into the kwargs, which then causes the specious calling of setShadowPen.

Anyways, if we check if shadowPen is a value other then none, this doesn't happen.
2019-06-24 14:01:17 -07:00
Ogi Moore
a4fe86a52d
Merge pull request #956 from ixjlyons/fix-exit-oserror
Handle invalid file descriptor in exit
2019-06-24 11:15:11 -07:00
Kenneth Lyons
c210795cac Add test for exit function 2019-06-24 10:47:35 -07:00
Sam Schott
d870a34359 add a test for clipping 2019-06-24 14:49:32 +01:00
Eugene Prilepin
1955ae024c Fix: object has no attribute 'border' 2019-06-24 16:36:23 +03:00
Eugene Prilepin
001390c160 Bugfix: GraphicsLayout border drawing
- Fixed border overlapping (issue #316)
2019-06-24 16:21:00 +03:00
Eugene Prilepin
b491f82006 Bugfix: ViewBox border drawing
- Fixed border overlapping (issue #316)
- Added new method ViewBox.setBorder to complete API
2019-06-24 16:21:00 +03:00
Sam Schott
262004e2ec Merge remote-tracking branch 'upstream/develop' into patch-3 2019-06-24 13:54:08 +01:00
Sam Schott
f23889d594 only use np.searchsorted quicker method fails 2019-06-24 13:53:00 +01:00
Ogi Moore
7506ee3d3f
Add mesa drivers to windows CI images and show openGL info during debug stage (#954)
Add mesa drivers to Windows CI Image
2019-06-23 23:03:51 -07:00
Ogi Moore
053fca6e83
Revert "_updateMaxTextSize to reduce text size when no longer needed (#838)" (#957)
This reverts commit 0ba07300e1.
2019-06-23 21:41:20 -07:00
SamSchott
0ba07300e1 _updateMaxTextSize to reduce text size when no longer needed (#838)
Currently `_updateMaxTextSize ` will increase the current space required for axis labels, if necessary, but not decrease it when the extra space is no longer needed. The proposed change will release no longer needed space again.
2019-06-23 18:10:35 -07:00
Daniel Hrisca
297e1d95a5 avoid double call to mkPen when creating PlotCurveItem objects (#817)
* avoid double call to mkPen when creating PlotCurveItem objects

* avoid unnecessary calls to mkPen in paint
2019-06-23 17:30:40 -07:00
SamSchott
3e7cace746 tickSpacing bug fix (#836)
Fixed a bug where `tickSpacing()` would return `None` if `style['maxTickLevel'] < 2`, resulting in the axis not being drawn.
2019-06-23 17:27:16 -07:00
SamSchott
1b6537b241 Curve fill: draw line around patch (#922) 2019-06-23 17:07:55 -07:00
Ben Mathews
dea8a86dfd Fixes https://github.com/pyqtgraph/pyqtgraph/issues/950 (#951)
Moving a scale handle on a ROI object does not fire a sigRegionChangeStarted signal.  This patch adds the signal emit to handleMoveStarted().
2019-06-23 17:05:11 -07:00
2xB
e510971d71 RotateFree handle now rotates freely (Code by alguryanow) (#952) 2019-06-23 17:01:32 -07:00
Kenneth Lyons
563083cf86 Handle invalid file descriptor in exit 2019-06-23 12:14:52 -07:00
Kenneth Lyons
9653254094 Fix infinite scale in makeARGB (#955) 2019-06-23 09:38:48 -07:00
2xB
9500f4db01 Allow multiline parameters in configparser (#949)
* FIX: Exception.message does not exist in Python3

* FIX: Allow multiline configfile parameters

* Added configparser tests

* Reasonable file ending for test files
2019-06-22 22:17:14 -07:00
2xB
781e129725 Fix deprecation warning of multi-dimensional tuples (#947) 2019-06-21 21:18:12 -07:00
Ogi Moore
132f417f72
Merge pull request #935 from 2xB/addLine-fix70
PlotItem.addLine now accepts 'pos' and 'angle' parameters
2019-06-20 09:18:57 -07:00
Ogi Moore
2f4ac51a11
Check if items having events sent to are still in the scene (#919)
Check if items having events sent to are still in the scene
2019-06-19 22:08:54 -07:00
Janez Demšar
9b8ef188a5 Fix incorrect clipping of horizontal axis when stopAxisAtTick is set (#932)
Horizontal axis are clipeed incorrectly because the code always takes
the vertical coordinate of the span even if the axis is horizontal.
2019-06-19 22:07:57 -07:00
2xB
04baa6eef7
addLine now accepts 'pos' and 'angle' parameters
The issue and this solution are discussed in issue https://github.com/pyqtgraph/pyqtgraph/issues/70.
2019-06-20 04:37:09 +02:00
2xB
fa2a03b8ec
Write Python representation of path to Python file
Before, if the path contained escaped sequences, they would be parsed before being written to `reload_test_mod.py`, therefore when the file was parsed by the Python interpreter, the escape signs would be missing. With this commit, the Python representation is written to the file, so escaped sequences stay escaped.
2019-06-18 20:14:51 +02:00
2xB
4a592ef10e
Prevent element-wise string comparison
Issue #835 shows that comparing `bins`, which may be a numpy array, with a string `'auto'` leads to element-wise comparison, because the `==` operator for numpy arrays is used. With this commit, potential array and string are switched, so the `==` operator for strings is used, which does no element-wise comparison.
2019-06-17 19:10:32 +02:00
Ogi Moore
7b47337eaf
Merge pull request #918 from j9ac9k/small-test-fixes
README, CONTRIBUTING changes, slight changes to azure CI template and tox.ini
2019-06-12 23:05:53 -07:00
Ogi Moore
10328817c7
Merge pull request #445 from eendebakpt/feat/remotewarning
add warnings for remote exceptions
2019-06-10 08:53:06 -07:00
Ogi Moore
3482a8436c
Merge pull request #914 from j9ac9k/fix-lastScene-signal-reference
Fix attribute lookup reference
2019-06-09 18:24:58 -07:00
Ogi
5c44d51d6c remove resolution test, have display information printed during debug step 2019-06-09 16:25:22 -07:00
Ogi Moore
172120106d
Merge pull request #861 from ixjlyons/errorbaritem-set-path
Set path attr in case ErrorBarItem initialized without data
2019-06-09 09:23:36 -07:00
Kenneth Lyons
c5126dc26f Update test name. Cleanup unused imports. 2019-06-09 09:12:01 -07:00
Kenneth Lyons
0c84234612 Add a test for ErrorBarItem 2019-06-08 19:57:53 -07:00
Ogi
9f7a4423af Fix attribute lookup reference 2019-06-07 15:06:59 -07:00
Ogi Moore
a838e0267f
Merge pull request #473 from tmtnslt/patch-1
Correct wrong function call in LayoutWidget.addLabel and LayoutWidget…
2019-06-07 14:39:12 -07:00
Kenneth Lyons
1839c5ef59
More concise visibility setting logic 2019-06-07 13:32:25 -07:00
Kenneth Lyons
a2fb00633a DeMorgans the logic for better readability. 2019-06-07 00:00:30 -07:00
Kenneth Lyons
654b76e6a3 Handle setting/clearing data a little more robustly. 2019-06-06 23:57:34 -07:00
Kenneth Lyons
501ad4f082 Only set visible when ErrorBarItem has something to draw. 2019-06-06 23:45:28 -07:00
Ogi Moore
a51ff8eb61
Merge pull request #134 from cjtk/develop
Fix bug in LayoutWidget.py getWidget (self.rows, not self.row)
2019-06-06 15:58:17 -07:00
Ogi Moore
ecbbb8232a
Merge pull request #910 from jetperch/develop
Moved emits after all method state updates
2019-06-06 11:48:44 -07:00
Ogi Moore
4a33f24582
Merge pull request #770 from cklb/develop
Fix issue #481 - `setCameraPosition` in `GLViewWiedget` ignored `pos` argument
2019-06-04 13:29:26 -07:00
Ogi Moore
cd857dbf2f
Merge pull request #778 from hoatd/patch-1
Fix bug in GLViewWidget.py
2019-06-04 13:24:14 -07:00
Ogi Moore
2552be986f
Merge pull request #901 from ksunden/reload
Add condition for namespace packages
2019-06-04 10:01:57 -07:00
Matt Liberty
c52382c3b9 Moved emits after all method state updates since PySide2 immediately executes signals.
Pull request #907 addressed a specific case where a signal was emitted before a state update.
If an application's slot then calls back into the instance, the instance was in an inconsistent
state.  This commit audits and fixes similar issues throughout the pyqtgraph library.  This
commit fixes several latent issues:

* SignalProxy: flush -> sigDelayed -> signalReceived would have incorrectly resulted in timer.stop().
* ViewBox: resizeEvent -> sigStateChange -> background state
* ViewBox: setRange -> sigStateChange -> autoranging not updated correctly
* ViewBox: updateMatrix -> sigTransformChanged -> any _matrixNeedsUpdate = True -> ignored
* Parameter: Child may have missed state tree messages on insert or received extra on remove
* GraphicsView: updateMatrix -> sigDeviceRangeChanged/sigDeviceTransformChange -> before propagated to locked viewports.
2019-06-01 16:28:23 -04:00
Ogi Moore
e7cbc12491
Merge pull request #813 from danielhrisca/axisitem_tweak
AxisItem performance improvements
2019-05-31 22:16:46 -07:00
Ogi Moore
99480dd184
Merge pull request #907 from jetperch/develop
Fixed ViewBox.updateViewRange to apply transformation sooner
2019-05-31 21:05:29 -07:00
Ogi Moore
1616e99b3a Fix docstring warning 2019-05-30 14:40:39 -07:00
Ogi
2df71abfec We support pyside2 don't we? 2019-05-30 14:40:39 -07:00
Ogi
f2426e9dd2 Capture Screenshots 2019-05-30 14:40:39 -07:00
Matt Liberty
b3c0bf635d Fixed ViewBox.updateViewRange so that transformation is updated for sigXRangeChanged and sigYRangeChanged in PySide2. 2019-05-29 20:02:00 -04:00
Luke Campagnola
52fef555ee
Merge pull request #904 from j9ac9k/take-screenshots
Take screenshots + Show Resolution
2019-05-29 13:12:12 -07:00
Ogi Moore
4b26519fef Move Desktop Resolution info print statement to test.py 2019-05-29 13:07:08 -07:00
Ogi Moore
c4e295ceae Use correct path seperators, pass png to upload function 2019-05-29 10:53:04 -07:00
Ogi
aa63c07523 Show available desktop resolution 2019-05-28 22:57:12 -07:00
Ogi
e8854d69bb Capture Screenshots 2019-05-28 22:57:12 -07:00
Kenneth Lyons
08e92adcaa
Merge pull request #894 from j9ac9k/fix-svg-export
Simpler way of extracting types from QByteArray
2019-05-27 17:55:07 -07:00
ksunden
6a4e0a106f Add condition for namespace packages 2019-05-27 16:49:08 -05:00
Thomas A Caswell
f2909e0cfb
Merge pull request #893 from j9ac9k/fix-qt5-pxCount
PySide2 is also a Qt5 binding
2019-05-25 20:19:12 -04:00
Kenneth Lyons
deab37d533 Try to import from collections.abc for Python 3.3+ (#887)
* Try to import from collections.abc for Python 3.3+
2019-05-25 16:25:49 -07:00
Ogi
c69e04db2d Simpler way of extracting types from QByteArray
Simpler way of extracting bytes from QByteArray
2019-05-25 00:24:48 -07:00
Ogi
849c7cab55 PySide2 is also a Qt5 binding 2019-05-24 23:28:48 -07:00
Ogi Moore
957aab008c
Merge pull request #888 from pyqtgraph/py3-treewidget
TreeWidget.topLevelItems Python 3 fix
2019-05-24 22:53:36 -07:00
Ogi Moore
d5b31f6401
Merge pull request #886 from ixjlyons/py3-flowchart
Fix flowchart save on Python 3
2019-05-24 15:58:59 -07:00
Kenneth Lyons
95f4b00e14 TreeWidget.topLevelItems Python 3 fix 2019-05-23 23:56:53 -07:00
Ogi Moore
c71083fff8
Merge pull request #767 from jimofthecorn/develop
fixed bug in graphicsItems/ImageItem.py: degenerate images (max==min)
2019-05-23 23:33:27 -07:00
Ogi Moore
e338447c37
Merge pull request #771 from 2xB/logscale_noruntimewarning
No warning for arrays with zeros in logscale
2019-05-23 23:24:03 -07:00
Ogi Moore
66604593c1
Merge pull request #814 from danielhrisca/enforce_enableMenu
enforce enableMenu in ViewBox
2019-05-23 23:22:52 -07:00
Ogi Moore
9ca9ae3911
Merge pull request #815 from ZanSara/develop
Fix issue #811
2019-05-23 22:44:19 -07:00
Ogi Moore
95d62cec6a
Merge pull request #876 from Dschoni/Fix-deprecated-boolean-substract
Typecast Levels to be float
2019-05-23 22:26:21 -07:00
Ogi Moore
bc59457748
Merge pull request #875 from Dschoni/develop
Fix numpy deprecation warning by typecasting multi-dimension indices to tuples.
2019-05-23 22:02:33 -07:00
Ogi Moore
58ae027197
Merge pull request #378 from ben-github/develop
Fix issue with Python3 and changes in how it handles zip.
2019-05-23 21:54:43 -07:00
Ogi Moore
4a76fff11a
Merge pull request #417 from termim/PlotDataItem_clear
In PlotDataItem.clear() use corresponding curve.clear() and scatter.clear()
2019-05-23 21:52:50 -07:00
2xB
e2b01ccf74 FIX: Correct deletion of matplotlib exporter window object (#868)
E.g. when opening the Matplotlib exporter multiple times, and one closes one instance, Python crashes.
This is caused by the Matplotlib QMainWindow listening to the closeEvent and deleting the only reference of
the window before it is closed properly.
2019-05-23 21:35:01 -07:00
HappyTreeBeard
8420fe984a Fixed bug in unit test where temp file remained open when os.unlink was called (#832) 2019-05-23 21:33:23 -07:00
Kenneth Lyons
ffd1624cb9 Use defaultSuffix for smarter file extension handling. 2019-05-23 19:02:56 -07:00
Kenneth Lyons
fd134f77c6 Only append .fc file extension if not added in the file dialog. 2019-05-23 17:53:42 -07:00
Kenneth Lyons
5c3214105c Merge remote-tracking branch 'duguxy/py3-flowchart-sl' into py3-flowchart 2019-05-23 17:49:21 -07:00
Kyle Sunden
20c74954a5
Merge pull request #830 from tacaswell/mnt_future_proof_text
MNT: future-proof the code a bit
2019-05-22 19:24:57 -05:00
dschoni
bac8080b0c Typecast Levels to be float
This circumvents cases in which "levels" is a boolean array and therefore the substraction fails due to deprecation.
2019-05-21 14:14:10 +02:00
dschoni
7f93e8205f Found one more instance of the same warning in functions.py 2019-05-21 13:38:46 +02:00
dschoni
42fd5614d0 Fix deprecation warning of multi-dimension tuples 2019-05-21 13:38:34 +02:00
Ogi
afb665ec99 make use of shiboken2 directly for isValid method 2019-05-12 17:35:26 -07:00
Ogi
d873ee6b26 fixes ImportError on importing pysideuic 2019-05-12 17:31:12 -07:00
Ogi
aa50296b9f gc.collect() causes segfault on pyside2, test will pass on pyqt5 bindings (did not test pyqt4 or pyside1) 2019-05-12 17:30:40 -07:00
Kenneth Lyons
2817b95c93 Set path attr in case ErrorBarItem initialized without data 2019-05-03 18:45:15 -07:00
Luke Campagnola
51b3201564
Merge pull request #824 from ronpandolfi/develop
Fix for PySide2; QtCore.QPoint.__sub__ no longer works with tuples
2019-05-03 10:58:21 -07:00
MingZZZZZZZZ
b773b020a5
Update LegendItem.py 2019-03-25 18:02:04 -04:00
SamSchott
365c13fedc
Clipping: don't assume that x-values have uniform spacing
Do not assume that x-values have uniform spacing -- this can cause problems especially with large datasets and non-uniform spacing (e.g., time-dependent readings from an instrument).

Use `np.searchsorted` instead to find the first and last data index in the view range. This only assumes that x-values are in ascending order. This prevents potentially too strong clipping.
2019-03-14 22:41:10 +00:00
Luke Campagnola
41107e4caa
expand docstring 2019-03-08 12:46:10 -08:00
Luke Campagnola
894c9a4362
move default handling up to colormapparameter 2019-03-08 12:33:14 -08:00
ALLENINST\stephanies
bafe1b4b74 group all defaults into one argument 2019-03-08 12:00:21 -08:00
ALLENINST\stephanies
fb098e9cdc add option to set other field variables in ColorMapWidget 2019-03-06 12:42:22 -08:00
Thomas A Caswell
da1bf54ec8
MNT: use raw for regular expression 2019-02-14 16:41:54 -05:00