Commit Graph

2965 Commits

Author SHA1 Message Date
Ogi Moore
fff2bc82c8
Merge pull request #1835 from pijyoi/skip_monkey
skip pytest monkeypatch
2021-06-14 19:58:30 -07:00
KIU Shueng Chuan
89f6c7da81 remove codepaths other than pixmap fragments codepath 2021-06-15 09:43:31 +08:00
KIU Shueng Chuan
abeae0b7fa init so that pointers are present 2021-06-15 06:50:31 +08:00
KIU Shueng Chuan
6bfb516768 skip pytest monkeypatch 2021-06-14 21:06:19 +08:00
KIU Shueng Chuan
a1845cddbc don't truncate floating point target coords 2021-06-14 19:24:39 +08:00
KIU Shueng Chuan
6839ec937a reuse pixmap fragment objects 2021-06-14 06:49:52 +08:00
KIU Shueng Chuan
ad3e3a6b8b ScatterPlotSpeedTest: add toggle for drawPixmapFragments 2021-06-13 08:00:45 +08:00
KIU Shueng Chuan
380ec2e0b2 implement usage of QPainter.drawPixmapFragments 2021-06-13 08:00:45 +08:00
Ogi Moore
cb4af3ac97
Merge pull request #1833 from pijyoi/fix_pyqt61_scatterplot
fix ScatterPlot render issues on PyQt6 6.1
2021-06-12 08:36:01 -07:00
KIU Shueng Chuan
98a020d1bb ROI.py::renderShapeMask : fix little-endian assumption 2021-06-12 20:25:28 +08:00
KIU Shueng Chuan
afe47def28 fix ScatterPlot render issues on PyQt6 6.1 2021-06-12 14:05:47 +08:00
Ogi Moore
e2b0a5ffae
Merge pull request #1830 from j9ac9k/Address-missing-enums
Add missing enums
2021-06-11 08:46:20 -07:00
Ogi Moore
e892ad37aa Add missing enums 2021-06-10 21:28:19 -07:00
Ogi Moore
7e8d34ecd8
Merge pull request #1824 from pijyoi/less_endian
remove little-endian assumption for image export
2021-06-09 15:02:48 -07:00
Martin Chase
2fb04b754c
Fix BusyCursor to use internal stack provided by setOverrideCursor/restoreOverrideCursor (#1827)
* un-busy as many times as needed

* lint

* add test to prove cursor behavior

* tentative change in the hopes that all supported qt versions behave properly

* remove unnecessary code

* use contextmanager decorator instead of class

* use full path to WaitCursor

* restore docstring; refactor variable for clarity

* fix docstring whitespace

* break up long lines

* use variable to shorten instead
2021-06-09 13:32:24 -07:00
KIU Shueng Chuan
6a2bfa5c84 fix PyQt6 long spelling for enums 2021-06-10 03:33:04 +08:00
KIU Shueng Chuan
b3e8f332fb add test for export to qimage 2021-06-10 03:18:12 +08:00
KIU Shueng Chuan
765f9648cd remove little-endian assumption for image export 2021-06-10 03:18:12 +08:00
Ogi Moore
6f0ffcbf8f
Merge pull request #1818 from j9ac9k/convert-enums
Convert Qt Enums to Qt6 Namespace
2021-06-08 21:57:45 -07:00
Ogi Moore
d974544053 Split up Execution of examples and tests in CI
There seems to be some unintentional side effect when running examples and the
same time.  This change breaks up the execution into two separate calls to
pytest in an attempt to bypass whatever issue is being created.
2021-06-08 21:23:49 -07:00
Ogi Moore
f225724f26 Close instead of clear test_scatterplotitm 2021-06-08 21:23:49 -07:00
Ogi Moore
3c352dd1a9 Fix documentation misalignment 2021-06-08 21:23:49 -07:00
Ogi Moore
2f1f297f39 Fix case of int-conversion for MouseButtons
This has been demonstrated to not work in PyQt6.
2021-06-08 21:23:49 -07:00
Ogi Moore
cc081af528 New Template Files for PyQt6 6.1
Update PySide6 templates to Qt 6.1
2021-06-08 21:23:49 -07:00
Ogi Moore
195a1a6fa3 Remove Qt 6.0 support
Simplify some PyQt6 code branches
2021-06-08 21:23:49 -07:00
Ogi Moore
d455da9aec Use Qt6 Enum Namespace
This namespace appears to be valid in PySide2/PyQt5 5.12+ so we may as
well migrate to the newer namespace ourselves.
2021-06-08 21:23:49 -07:00
Ogi Moore
29bdf9949e Skip GLTextIem on some conditions on macOS 2021-06-08 21:11:24 -07:00
Nils Nemitz
7d41e8a878
Color map linearization (#1797)
* extended color map functions

* assertion string, documentation pass, comment purge

* fix some documentation links

* simplify assert statement

* removed comments and redundancy, renamed modulated bar

* include modulatedBarData in documentation

* test running matplotlib with dummy backend

* skip color maps example on OSX/PySide6.1.1

* removed skipping of tests

* reverted some accidental whitespace, removed unneeded numpy import

* removed unneded alpha parameter
2021-06-08 20:41:46 -07:00
Nils Nemitz
f002d70adc
Expose number of subsamples in ImageItem auto-level determination (#1638)
* exposed number of subsamples in auto-level determination

* Removing print statement at @NilsNemitz's request

* make levelSamples count pixels, not pixels * channels

* minimum number of samples can be 2 if we look at pixels anyway

* adjusted minimum levelSamples to 4: Otherwise a 2x2 image downsamples to a single pixel

* extended docstring for level to make the user aware of auto-level subsampling

* subsample towards square array for auto-leveling

* eliminated duplicated code between level downsampling and samples and QuickMinMax method

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2021-06-08 10:25:47 -07:00
Ogi Moore
823988d51c
Merge pull request #1821 from pijyoi/case_sensitive_exception 2021-06-08 05:39:35 -07:00
KIU Shueng Chuan
1715d5a6fa error on presence of "Exception:" and "Error:" 2021-06-08 15:13:17 +08:00
Nils Nemitz
61f067bf7c
Add axis convenience methods and matrix display example (#1726)
* add axis convenient methods and matrix display example

* wrestled wayward space back into docstring

* color map names are case sensitive on Linux

* docstring fix for PlotItem

* protect AxisItem.linkToView from being obscured by DateAxisItem override

* replaced setOrigin method by promoted setPos and setScale

* made tri-state axes switching explicit

* reverted setRect behavior, documentation pass for ImageItem

* minor text adjustment

* implmented some suggested revisions

* fix input parsing for setRect and add tests so that I don't break it again

* don't try to re-add transform after clearing it

* changed example and doc image generators to pg.exec()

* removed commented-out code

* cleaned up transform eqaulity assertion

* restored devoured comment

* restored devoured comment
2021-06-07 07:44:19 -07:00
Ogi Moore
3a3d05b16f
Merge pull request #1817 from pijyoi/split_finite
implement QPolygonF codepath for connect="finite"
2021-06-06 21:55:51 -07:00
bsobhani
d863907163
add function to disable autoscaling (#1819) 2021-06-06 21:19:23 -07:00
shikishima-TasakiLab
f13002b251
Add "GLTextItem" (#1776)
* Add GLTextItem

* Fixed DocString.

* Delete unnecessary function.

* Add `from .items.GLTextItem import *`

* Add an example.

* [Combines two `isinstance()` into one.](https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046120)

* [Combines two `isinstance()` into one.](https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046120)

* [The long code has been broken up into separate lines.](https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046234)

* [Moved `pos`, `color`, `text`, and `font` to the `__init__` method.](https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633047216)

* Add `import initExample` and fix `mkQApp().exec_()` to `pg.exec()` (https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046878, https://github.com/pyqtgraph/pyqtgraph/pull/1776#discussion_r633046781)

* Fix `pg.exec()` to `pg.mkQApp().exec()`

* Revert "Fix `pg.exec()` to `pg.mkQApp().exec()`"

This reverts commit 67d397d803.

* Remove type-hints.

* Fix `glColor4d(float(self.color[0]), float(self.color[1]), float(self.color[2]), float(self.color[3]))` to `glColor4d(*self.color)`

* Add `value = fn.glColor(value)`

* Remove debug print.

* Add GLGridItem and GLAxisItem

* Remove if-check for "color" argument

* Draw text without using GLUT.

* Divide the text position by the device pixel ratio

* Fixed bare exceptions to ValueError and TypeError.

* Add 'GLTextItem.py' to utils.py.

* Fixed a bare exception to ArgumentErrror.

* Add `__all__ = ['GLTextItem']`
2021-06-05 08:19:54 -07:00
KIU Shueng Chuan
ecc3563f6d special-case all-finite 2021-06-05 20:13:07 +08:00
KIU Shueng Chuan
8997cfa07c test the QPolygonF codepath 2021-06-05 15:09:59 +08:00
KIU Shueng Chuan
c8e6920443 use multiple polygons for "finite" 2021-06-05 15:09:59 +08:00
Ogi Moore
e206ea5ae9
Merge pull request #1796 from j9ac9k/test-polyline
If arrayToQPath uses connect=all, use a different construction for QPainterPath
2021-06-04 21:33:45 -07:00
Ogi Moore
145ab2e9e3 Merge branch 'master' into test-polyline 2021-06-04 21:06:52 -07:00
Ogi Moore
5c54577c26
Merge pull request #1807 from j9ac9k/merge-test-data
Merge test data + make tests directory which contain tests
2021-06-04 21:06:11 -07:00
Ogi Moore
55e42aabfd make numpy style docstring of arrayToQPath
The function had many comments/explanations, decided to convert to
numpy docstring style, which is the direction pyqtgraph is going in
as it stands
2021-06-03 22:53:09 -07:00
Ogi Moore
649757eb31 Remove use of QPolygonF in non-finite cases
With some experimentation, it was determined that when the QPainterPath
is drawn with a QPen that has a thickness greater than 1, the end result
is quite broken.  Due to us trying to exploit non-advertised behavior
we are removing this optimization step.
2021-06-03 22:53:09 -07:00
Ogi Moore
31b4210f4e
Merge branch 'master' into merge-test-data 2021-06-02 22:15:46 -07:00
Ogi Moore
bd11e5e401
Merge pull request #1816 from ntjess/rich-param-cmp
Fix #1814
2021-06-02 09:19:28 -07:00
njessurun
c0ebf8a432 Fix #1814 2021-06-02 11:03:22 -04:00
Ogi Moore
c0b9f3e26e
Merge pull request #1795 from pijyoi/avoid_writable_qimage
don't rely on QImage-wrapped buffer being writable
2021-06-01 23:05:01 -07:00
Ogi Moore
45cf6fa232 Remove comment about QImage data references
Comment was out of date and no longer relevant, removing at @pijyoi's
suggestion.
2021-06-01 22:50:02 -07:00
Nils Nemitz
39f705fd7f
Sanitize input for plotItem.showGrid (was documentation fix for plotItem.showGrid alpha setting) (#1809)
* documentation fix for plotItem.showGrid alpha setting

* revert to 0-1 scale
2021-06-01 22:43:58 -07:00
Ogi Moore
0da1958ff1
Merge pull request #1768 from pijyoi/rgb32_alpha_chan
Format_RGB32 will always have alpha equal 255
2021-06-01 22:25:08 -07:00