Commit Graph

898 Commits

Author SHA1 Message Date
Nils Nemitz 0cc3580687
Traditional log10 mode for PlotDataItem (by adding "mapped data" stage) (#1992)
* make PlotDataItem aware of mapped data

* inf suppression, metadata storage and refactor of data structures

* cleanup, test, and documentation pass

* re-added prepareForPaint, added PlotDataset to sphinx index

* strip more print statements

* indicate (internal) PlotDataset documentation as orphaned to avoid sphinx error

* Do not export PlotDataset

* replacement example

* example comments
2021-10-06 22:40:38 -07:00
Jan Kotanski 4334cd14de fix for autoLevel of RGB histograms 2021-09-08 09:20:12 +02:00
Ogi Moore 126b7e0925
Merge pull request #1985 from pijyoi/workaround_float_lut
delegate float luts to makeARGB()
2021-09-07 21:48:15 -07:00
magnium 6f4b6b1b88
Fix ImageView levelMode (#1974)
* fixes #1769

* Automatically set image to ImageView if imageItem is provided.
Added a test for correct initialization of ImageView with imageItem and levelMode.
2021-09-07 21:27:26 -07:00
Petras Jokubauskas 745b04baa5
Fix: updateDecimate should not unhide intentionaly hidden curves (#1973)
* Update PlotItem.py

make update decimate to not unhide curves when items added/removed,
while preserving the Max Traces well behaviour

* Update PlotItem.py

fix typo

* Update PlotItem.py

fix: typo with self as argument

* give better name for the function which handles MaxTraces checkstate change

rename it to _handle_max_traces_toggle

* add doc string to updateDecimation

* add test for PlotItem for external curve visibility control

check if hidden curve would stay hidden when adding or removing other items.

* remove additional empty line between methods
2021-09-07 21:19:22 -07:00
KIU Shueng Chuan b5475cad6b warn about usage of non-uint8 LUTs 2021-09-08 09:52:46 +08:00
KIU Shueng Chuan 6763b14fb9 delegate float luts to makeARGB() 2021-09-07 00:04:42 +08:00
Ogi Moore f16125c378
Merge pull request #1951 from timgates42/bugfix_typos
docs: Fix a few typos
2021-08-04 22:01:50 -07:00
Tim Gates a2078f8a87
docs: Fix a few typos
There are small typos in:
- doc/source/how_to_use.rst
- doc/source/region_of_interest.rst
- examples/ViewBox.py
- pyqtgraph/flowchart/Node.py
- pyqtgraph/graphicsItems/AxisItem.py
- pyqtgraph/graphicsItems/PColorMeshItem.py
- pyqtgraph/graphicsItems/PlotDataItem.py
- pyqtgraph/graphicsItems/TargetItem.py
- pyqtgraph/graphicsItems/ViewBox/ViewBox.py
- pyqtgraph/widgets/RawImageWidget.py

Fixes:
- Should read `mapped` rather than `maped`.
- Should read `vector` rather than `vetctor`.
- Should read `value` rather than `vaule`.
- Should read `preferable` rather than `preferrable`.
- Should read `output` rather than `ouptut`.
- Should read `information` rather than `inforation`.
- Should read `information` rather than `infomation`.
- Should read `exempt` rather than `excempt`.
- Should read `emphasizing` rather than `emphacizing`.
- Should read `construction` rather than `constrution`.
2021-08-05 06:47:08 +10:00
KIU Shueng Chuan efa662415e use QColor methods and functions 2021-08-04 09:19:34 +08:00
njessurun c0eb3267d2 Remove python 2 code paths 2021-08-02 12:07:25 -04:00
Kyle Sunden a472f8c5de
Remove all usage of python2_3.py (#1939)
* Remove all usage of python2_3.py

Technically these functions were exported at the top level of the library, this removes them without warning... If we want to we can bring them back for there, but I honestly don't think its needed, as we are py3 only now and have been for multiple releases.

This may introduce a number of 'useless cast' or similar but those were always happening anyway

This PR brought to you by sed

* Update varname in hdf example to avoid collision with builtin

* Clean up some leftover comments surrounding imports of compat code

* Unnecessary string casts

* Additional unnecessary casts

* syntax error fix

* more unnecessary casts

* Yet more unnecessary casts
2021-08-01 21:43:32 -07:00
KIU Shueng Chuan aebc66dcaa fix log mode by reverting to previous formulation
this formulation is in the documentation for setLogMode()
2021-08-01 11:11:41 +08:00
Kyle Sunden 6a59b7e5b5
Many unused import cleanups (#1935)
* Many unused import cleanups

Ignored some star imports, some vendored code in colorama, only looked within pyqtgraph the library, not e.g. examples

* SpinBox decimal imported with both import and from import
2021-07-31 07:35:23 -07:00
KIU Shueng Chuan 04673ac98b rename: qimage_to_ndarray -> ndarray_from_qimage 2021-07-31 21:10:34 +08:00
KIU Shueng Chuan 9913f7c1e7 import shiboken{2,6} as shiboken 2021-07-31 15:58:56 +08:00
Martin Schulz 96cccd96ec
make antialiasing optional for paintGL in PlotCurveItem (#1932)
* make antialiasing optional for paintGL in PlotCurveItem

* reversion to standard values if aa is disabled

* remove unnecessary lines
2021-07-30 12:19:02 -07:00
Martin Chase eb8965c2f4
Restore previous signature on TargetItem.setPos() (#1928)
* Restore previous signature on TargetItem.setPos()

* star means something to sphinx

Co-authored-by: Luke Campagnola <luke.campagnola@gmail.com>
2021-07-27 18:04:24 -07:00
Nils Nemitz 7009084e4c
more readable names for color map references in ColorBarItem API (#1908)
* more readable names for color map references

* changed example code

* activated deprecation warnings

* added accessor methods for cmap/colorMap
2021-07-23 14:45:57 -07:00
Martin Chase 1d40d50b89
push bullet lists over 2 spaces to get them to show up as such in the… (#1912)
* push bullet lists over 2 spaces to get them to show up as such in the docs

* separate the literal block from the bullet list
2021-07-21 07:12:35 -07:00
Ogi Moore 66ec0996f4
Merge pull request #1610 from j9ac9k/boost-plotline-performance
Boost plotline performance
2021-07-18 13:44:01 -07:00
Nils Nemitz 8b4db67ae9 None-check self.label before access 2021-07-18 17:24:55 +09:00
Ogi Moore d5990bf32c Uncomment ViewBox.itemChange
This handles calls for ViewBox.prepareForPaint
2021-07-17 22:30:36 -07:00
Ogi Moore ed66eef203
Merge pull request #1902 from pijyoi/simpler_mvp
simplify modelview projection computation
2021-07-17 22:03:32 -07:00
Kenneth Lyons ba7129a719
Add option to limit LinearRegionitem bounds to a secondary item (#1834)
* Added clipItem option to LinearRegionItem

* Added a clipItem option to LinearRegionItem

Handle case when no self.viewBox() is yet available

* Implement LinearRegionItem clipItem

* Undo unnecessary change

* Update clipItem doc

* Fixup docstring formatting

* Cleanup

* Support clearing clipItem via setBounds. Fix initialization bug

* Add tests for LinearRegionItem clipItem

* Better clipItem demo in crosshair example

* Another test to verify claim in docstring

Co-authored-by: Arjun Chennu <arjun.chennu@gmail.com>
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
Co-authored-by: Arjun Chennu <achennu@mpi-bremen.de>
2021-07-17 21:02:06 -07:00
KIU Shueng Chuan 31f9d0024a simplify modelview projection computation
1) no need to get rect(), which is actually defined as
	QRect(0, 0, width(), height())
2) use col-maj data() instead of row-maj copyDataTo()
   - glLoadMatrixf() takes col-maj
2021-07-17 07:56:21 +08:00
KIU Shueng Chuan 7442ab1e52 PlotCurveItem: setup modelview and projection 2021-07-15 23:16:26 +08:00
Nils Nemitz 523b31e97f
Draw GradientLegend in ViewBox coordinates (#1864)
* draw GradientLegend in ViewBox coordinates

* some cleanup

* do not proceed with dummy values

* correct bar and label order, add some styling options

* remove debugging code
2021-07-03 21:43:39 -07:00
Kenneth Lyons 7ebae20c5d Fix LineROI handle positions 2021-07-03 07:51:23 -07:00
Nils Nemitz c07b95812c clear out ticks instead of hiding them 2021-06-26 20:42:11 +09:00
Ogi Moore 93fa8664cb
Merge pull request #1846 from pijyoi/import_hygiene
reduce pollution of pg namespace
2021-06-25 23:26:26 -07:00
Ogi Moore 418a181691 Use built-in int as dtype 2021-06-25 08:45:02 -07:00
KIU Shueng Chuan 81baa182c5 add __all__ to various files 2021-06-25 21:19:33 +08:00
Nils Nemitz 775f1d629c
Separate out mouse events stolen by AxisItem (#1845)
* separate out mouse events on main plot area

* work in scenepositions so that detection also works in a layout

* added comments/remove debug statements
2021-06-22 16:17:39 -07:00
Jennifer Manriquez 2899143e84 Allow border=False in GraphicsLayout 2021-06-16 19:35:42 -05:00
Ogi Moore 61dedcb4a5
Merge pull request #1794 from pijyoi/numba_lookup 2021-06-15 16:42:54 -07:00
KIU Shueng Chuan f63d1e4206 document PyQt boxing and unboxing 2021-06-15 11:40:27 +08:00
KIU Shueng Chuan 7c6d9fe6d5 cleanup python2 and unused imports 2021-06-15 11:06:37 +08: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 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 380ec2e0b2 implement usage of QPainter.drawPixmapFragments 2021-06-13 08:00:45 +08: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 e892ad37aa Add missing enums 2021-06-10 21:28:19 -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