Commit Graph

301 Commits

Author SHA1 Message Date
Luke Campagnola
797a8c0f08 Implementing user-defined limits for ViewBox 2014-01-28 13:22:54 -05:00
Luke Campagnola
d86beb5a5a Added setMinimumPlotHeight method, set default min height to 50px. 2014-01-25 08:58:54 -05:00
Luke Campagnola
5a1a663a50 MultiPlotWidget now uses scroll bar when plots do not fit in widget area. 2014-01-25 08:50:31 -05:00
Luke Campagnola
d4364ea17a Fix MultiPlotWidget wrapping methods incorrectly. 2014-01-25 07:37:04 -05:00
Luke Campagnola
21639196d8 Fix imports in MultiPlotWidget and its example.
Merge remote-tracking branch 'termim/develop' into multiplotwidget-fix
2014-01-25 07:30:29 -05:00
Luke Campagnola
23779f004e - Fixed FillBetweenItem to force PlotCurveItem to generate path
- Added FillBetweenItem.setCurves()
- Added FillBetweenItem example
2014-01-23 10:34:26 -05:00
Mikhail Terekhov
baa6c4b82c Fix metaarray import in MultiPlotWidget.py example and MultiPlotItem.py 2014-01-20 22:15:14 -05:00
Luke Campagnola
ca68f05f1f Fix: PlotCurveItem now ignores clip-to-view when auto-range is enabled. 2014-01-19 08:37:58 -05:00
Luke Campagnola
e97aebb343 Merge branch 'develop' of https://github.com/johnelund/pyqtgraph into johnelund-develop 2014-01-18 23:26:27 -05:00
Luke Campagnola
b3e07a0e0a ImageItem fix against a51c30d 2014-01-18 19:59:36 -05:00
Luke Campagnola
c9c2160856 more cleanups
added simple test
2014-01-18 19:13:39 -05:00
Luke Campagnola
b813ecabc3 cleanup; corrected view clipping. 2014-01-17 18:31:36 -05:00
John Lund
a381c61c0c LegendItem bugfix
drawSymbol is module-level funct, not class method
2014-01-17 08:59:59 -06:00
Luke Campagnola
6e5e35691c cleanups 2014-01-16 20:34:05 -05:00
Luke Campagnola
704f2f2048 Merge remote-tracking branch 'gpoulin/scatter_optim' into scatter-optim
Conflicts:
	pyqtgraph/functions.py
	pyqtgraph/graphicsItems/AxisItem.py
2014-01-15 00:11:05 -05:00
Luke Campagnola
19293d5b67 fixed division by zero 2014-01-14 22:29:46 -05:00
Luke Campagnola
e8dd3e6e57 ImageItem.getHistogram is more clever about constructing histograms:
- integer dtype images now have integer-aligned bins, with bin number
    determined by a target value
  - step size is automatically chosen based on a target image size
  - bins and step arguments have default values 'auto'
2014-01-14 22:22:50 -05:00
Antony Lee
20b9d079ce Nicer range for value histogram of integer images.
When an ImageItem's data has an integer dtype, this patch ensures that
each bin of the LUT histogram contains the same number of integer
values, in order to avoid "spikes" in the histogram that are merely due
to some bins covering more integer values than others.

This commit needs testing (it was rebased from an old commit).
2014-01-14 01:33:52 -08:00
Luke Campagnola
33e4a9e213 Fix: prevent divide-by-zero in AxisItem 2014-01-05 14:40:56 -05:00
Luke Campagnola
eda59be46d corrected PolyLineROI.setPen() to modify individual segments as well. 2014-01-04 01:03:58 -05:00
Luke Campagnola
95dd56bdb6 Bugfixes:
- fixed PlotCurveItem generating exceptions when data has length=0
- fixed ImageView.setImage only working once
2014-01-01 20:22:13 -05:00
Luke Campagnola
21c1686221 Fixed AxisItem to support unicode in tick strings 2013-12-29 09:17:23 -05:00
Luke Campagnola
a199b75c66 Added Flowchart.sigChartChanged 2013-12-27 22:48:44 -05:00
Luke Campagnola
2aac1faa17 fixes for python3 2013-12-27 22:32:05 -05:00
Luke Campagnola
4886270b53 PlotNode control widget now displays combo box to let user select plots to connect to
Flowchart example updated to use this feature.
2013-12-27 21:07:03 -05:00
Luke Campagnola
2c2135a49f Major updates to ComboBox:
- Essentially a graphical interface to dict; all items have text and value
- Assigns previously-selected text after list is cleared and repopulated
- Get, set current value
2013-12-27 21:06:31 -05:00
Luke Campagnola
f4e0f091dc Fixes against relative-import reorganization 2013-12-23 18:42:02 -05:00
Luke Campagnola
f21e0b86a4 fixed circular import 2013-12-23 10:22:53 -05:00
Luke Campagnola
a069104c6b rebuild UI files 2013-12-23 10:11:20 -05:00
Luke Campagnola
7e907db557 .ui files 2013-12-23 10:08:26 -05:00
Luke Campagnola
50df2b2def dockarea, imageview, metaarray 2013-12-23 10:06:26 -05:00
Luke Campagnola
eaf29b5f07 flowchart, canvas 2013-12-23 10:01:20 -05:00
Luke Campagnola
7777240d89 exporters, multiprocess, opengl 2013-12-23 09:46:54 -05:00
Luke Campagnola
a2e8290d8e console, graphicsscene, and 2nd-level graphicsitems 2013-12-23 07:51:33 -05:00
Luke Campagnola
cf312e7bac updated widgets 2013-12-22 02:18:37 -05:00
Luke Campagnola
f630734453 Switching to relative imports to allow pyqtgraph to be imported under other names.
finished top-level files and graphicsItems
2013-12-22 02:08:39 -05:00
Luke Campagnola
90b6b5b501 python 3 fixes 2013-12-21 23:41:37 -05:00
Luke Campagnola
19be6959f3 Flowchart:
* Replaced dynamic imports with static
* Added NodeLibrary allowing multiple customized collections of Node types
2013-12-21 23:26:02 -05:00
Luke Campagnola
59f07a03ee python3 fix 2013-12-21 23:26:02 -05:00
Luke Campagnola
b50b94908f pyqtgraph, .exporters, and .opengl now use static imports 2013-12-21 23:26:02 -05:00
Luke Campagnola
03c01d3b32 Fixes related to CSV exporter:
- CSV headers include data names, if available
  - Exporter correctly handles items with no data
  - pg.plot() avoids creating empty data item
  - removed call to reduce() from exporter; not available in python 3
  - Gave .name() methods to PlotDataItem, PlotCurveItem, and ScatterPlotItem
2013-12-19 12:30:00 -05:00
Luke Campagnola
a0b7e5a61c Corrected mouse clicking on PlotCurveItem - now uses stroke outline instead of path shape
Added 'width' argument to PlotCurveItem.setClickable()
2013-12-19 09:56:58 -05:00
Luke Campagnola
4e9e75817f Added Qt.loadUiType function for PySide
Added example of simple Designer usage.
2013-12-17 21:23:37 -05:00
Luke Campagnola
768c2b3356 Merge branch 'version_strings' into develop
* __init__.py now contains latest release version string
* installing from git checkout that does not correspond to a release commit
  will result in a more descriptive version string
2013-12-15 13:19:00 -05:00
Luke Campagnola
6d57792dc6 Merge branch 'profilers' into develop
New Profiler class from Antony Lee:
* Simpler API (with backward compatibility)
* Individual Profilers can be enabled by environmental variable PYQTGRAPHPROFILE
2013-12-15 09:17:24 -05:00
Luke Campagnola
5b7f4124d9 * Made new profilers compatible with old API
* Adjusted output formatting for clearer representation of nested profilers
* Message string formatting deferred until finish to reduce overhead
2013-12-15 09:07:09 -05:00
Luke Campagnola
e4ca62448b Added Dock.raiseDock() method 2013-12-11 14:28:56 -05:00
Luke Campagnola
6ae0892ea0 Set version strings to 0.9.8 in source; these will be updated with major releases.
Added tools/setVersion script
setup.py now auto-generates version string based on pyqtgraph/__init__ and git info, if available
2013-12-01 10:23:45 -05:00
Antony Lee
f136b33033 Profilers controllable via PYQTGRAPHPROFILE.
A new function profiling system is implemented.  Most importantly, this
allows one to profile various internal functions directly by setting the
`PYQTGRAPHPROFILE` environment variable to a comma separated list of
function and method names, e.g.

    PYQTGRAPHPROFILE=functions.makeARGB,ImageItem.render \
        python -mexamples

Specifically, items in `PYQTGRAPHPROFILE` must be of the form
`classname.methodname` or `dotted_module_name.functionname`, with the
initial "pyqtgraph." stripped from the dotted module name.

Moreover, the overhead of inactive profilers has been kept minimal: an
introspective check of the caller's name (only if `PYQTGRAPHPROFILE` is
set) and a trivial function (not method) call per profiler call.

The new profilers rely on `sys._getframe` to find the caller's name,
although the previous system (passing the caller's name explicitely)
could certainly have been kept instead.

Finally the API of profilers has been changed: register a
profiling point simply by calling the profiler, and profilers are
automatically flushed on garbage collection.  See the docstring of
`pyqtgraph.debug.Profiler` for more details.
2013-11-27 09:57:46 -08:00
Luke Campagnola
c1f72b29c6 Merge branch 'faster-make-argb' into develop
- Speed improvements in functions.makeARGB
- ImageItem is faster by avoiding makeQImage(transpose=True)
2013-11-24 21:11:21 -05:00
Luke Campagnola
71ee4deb84 - fixed ImageItem handling of rgb images
- fixed makeARGB re-ordering of color channels
2013-11-24 21:10:06 -05:00
Luke Campagnola
bd2330af9f ImageItem performance boost by avoiding makeQImage(transpose=True) 2013-11-24 20:45:10 -05:00
blink1073
a08b28c958 Simplify to take transpose logic out of makeARGB function 2013-11-24 15:50:28 -06:00
blink1073
ddce17dc62 Undo remove trailing whitespace 2013-11-23 23:08:18 -06:00
blink1073
85d7116482 Speedups for making ARGB arrays 2013-11-23 23:02:19 -06:00
Luke Campagnola
d34bdb1be7 corrected GradientWidget.__all__ 2013-11-22 09:33:02 -05:00
Luke Campagnola
6e74df28a0 Merge branch 'dont-copy-context-menu' into develop
This allows ViewBox context menus to be modified by directly manipulating ViewBox.menu
2013-11-21 23:38:44 -05:00
Luke Campagnola
19cf49bc7d fixed context menu handling for non-GraphicsItems 2013-11-21 23:29:03 -05:00
Luke Campagnola
8deaf0866f avoid division by zero when ViewBox has size or aspect = 0 2013-11-21 13:37:01 -05:00
Luke Campagnola
f05c10a80f removed unnecessary scipy import 2013-11-21 09:57:56 -05:00
Luke Campagnola
a972114b4f Fixed ViewBox not updating immediately after call to setAspectLocked 2013-11-21 07:56:30 -05:00
Antony Lee
23a0d6d7c0 Use actions of ViewBox's contextMenu in full menu.
The main change is on `ViewBox.getContextMenus`, which now returns an
up-to-date of actions that `GraphicsScene.addParentContextMenus` can use.

Also, `getContextMenus` was given a default implementation in the base
class (falling back on `getMenu` if defined), and some cleanup was done.
2013-11-20 12:23:07 -08:00
Luke Campagnola
0a5cb62a6f ImageItem now has auto downsampling; seems to be working properly.
Still need auto clipping as well.
2013-11-20 13:51:39 -05:00
Luke Campagnola
193b1097b2 Merge branch 'axis_unicode_fix' into develop 2013-11-19 14:47:03 -05:00
Luke Campagnola
901e8ae596 Fixed unicode handling in AxisItem label 2013-11-19 14:45:57 -05:00
Luke Campagnola
5b905cde8b Override ViewBox.popup() to update menu before showing
Extend ViewBox menu in examples/contextMenu
2013-11-19 07:46:17 -05:00
Luke Campagnola
5b156cd3d3 Fixes for multiprocess / RemoteGraphicsView:
- Process now optionally wraps stdout/stderr from child process to
  circumvent a python bug
- Added windows error number for port-in-use check
- fixed segv caused by lost QImage input in pyside
2013-11-17 22:32:15 -05:00
Antony Lee
2e61be739f Don't copy the context menu of ViewBoxes.
This allows customization of the context menu of a ViewBox simply by
calling viewbox.menu.addAction(...).  See issue #13.  Also some cleanup.
2013-11-17 14:21:13 -08:00
Luke Campagnola
1418358bfb Fixed RemoteGraphicsView passing mouse events on python3 + pyside 2013-11-17 14:12:00 -05:00
Luke Campagnola
08be09ee40 Fixed RemoteGraphicsView on windows
- Avoid using authkey on windows; seems to be broken
 - Included yet another method of accessing shared memory as QImage
2013-11-17 09:27:55 -07:00
Luke Campagnola
8d7ab108fd Fixed PySide issues by removing itemChange methods from GraphicsWidget and ViewBox;
Workaround is for ViewBox to see whether its scene has changed every time it paints.

Fixes: 12
2013-11-16 20:23:41 -05:00
luke
25d666a1da Avoid calling QGraphicsWidget.itemChange--this causes segfault in python3 + pyqt
Fixes #10
2013-11-15 22:05:09 -05:00
Antony Lee
dac7eb5817 Faster import of PyQtGraph.
* RawImageWidget (and thus OpenGL) isn't imported by default anymore.
* scipy.stats.scoreatpercentile is replaced by numpy.percentile.

This commit has not been tested as the example runner is currently
broken.
2013-11-15 11:00:12 -08:00
Luke Campagnola
ef2ffdd88c Fixed bug: ViewBox context menu elements are no longer deleted when using flowchart + pyside 2013-11-14 14:01:25 -05:00
Luke Campagnola
f8772d179f removed unused variable 2013-11-14 12:16:31 -05:00
Luke Campagnola
810b90a1e6 Minor fix in ScatterPlotItem handling of per-point data 2013-11-10 23:25:07 -05:00
Luke Campagnola
ccc5e6274a Fixes:
- GraphItem reports pixel margins to improve auto-range
 - ViewBox.setRange is more careful about disabling auto range for axes that are set
2013-11-07 12:05:05 -05:00
Luke Campagnola
58ed8ee7bd ViewBox overhaul. Cleaned up code pathway:
- setRange now only affects target range
  - updateViewRange only affects view range
  - updateMatrix only affects childGroup transform
  - updateMatrix is only called before a render

Pathway now looks like:
        setRange -> updateViewRange -> matrix dirty -> ...
                                    -> sigRangeChanged

        ... -> prepareForPaint -> updateAutoRange, updateMatrix if dirty
2013-11-06 23:26:57 -05:00
Luke Campagnola
31928e70a5 Bugfixes:
- GraphicsView.render now correctly invokes GraphicsScene.prepareForPaint
 - Fixed RemoteGraphicsView renderer to use new PyQt QImage API.
 - multiprocess.Process now pipes stdout/err directly to console when in debugging mode
2013-11-06 23:14:27 -05:00
Luke Campagnola
ea8079334f Correct ViewBox.translate to use setRange(x, y) when possible rather than making two calls. 2013-11-06 15:35:24 -05:00
Luke Campagnola
96a4ff7cd5 Fixes:
- ROI updates on sigTransformChanged
  - ViewBox is more careful about accepting all auto-range changes up to the point it is disabled, even if the auto-range calculation is deferred.
2013-11-04 22:07:43 -05:00
Luke Campagnola
0daae425a3 A bit more flow reorganization 2013-11-03 19:41:05 -05:00
Luke Campagnola
6083521387 Initial success. Testing and further reorganization to follow. 2013-11-03 17:55:57 -05:00
Luke Campagnola
a4103dd152 Mid-way through overhaul. Proposed code path looks like:
setRange -> updateViewRange -> matrix dirty
                            -> sigRangeChanged

    ... -> prepareForPaint -> updateAutoRange, updateMatrix if dirty
2013-11-03 17:10:59 -05:00
Luke Campagnola
ab1b1c6adf Added ViewBox test suite 2013-10-25 10:33:41 -04:00
Luke Campagnola
662af1a9c5 ignore test directories in top-level __init__ imports 2013-10-25 10:31:30 -04:00
Luke Campagnola
84a845185e Fix: when ViewBox is resized, update range if it is linked to another view 2013-10-20 11:06:57 -04:00
Luke Campagnola
bb2ecd033c minor fix 2013-10-18 15:10:44 -04:00
Luke Campagnola
f19df05bdf Allow AxisItem.setScale(None) to retain API backward compatibility. 2013-10-18 15:02:17 -04:00
Luke Campagnola
03fd45c24a Updated documentation to match previous API change 2013-10-18 14:59:17 -04:00
Luke Campagnola
390f78c810 Fixed improper tick spacing and axis scaling
This requires an API change:
 - AxisItem.setScale(float) has the usual behavior
 - AxisItem.setScale(None) is no longer allowed. Instead use:
 - AxisItem.enableAutoSIPrefix(bool) to enable/disable SI prefix scaling
Also makes the API more intuitive since these features are now accessed and implemented independently.
2013-10-18 14:47:49 -04:00
Luke Campagnola
ea6f4ef442 Add backport ordereddict to repository
Merge remote-tracking branch 'kif/master' into develop

Conflicts:
	pyqtgraph/pgcollections.py
2013-10-18 11:21:15 -04:00
Luke Campagnola
b993c64c48 Workaround for OrderedDict bug: import from 'ordereddict' backport module if available 2013-10-18 09:46:48 -04:00
Jerome Kieffer
4052c3e9d1 Ordereddict exploses with python2.6 ...
Use the official backport
2013-10-17 20:19:30 +02:00
Guillaume Poulin
d22403f84f Correct symbols position 2013-09-24 17:13:13 +08:00
Guillaume Poulin
36979b67ea Clean ScatterPlotItem 2013-09-24 17:06:51 +08:00
Guillaume Poulin
73a079a649 Improve ScatterPlotItem.py
Add optimization for PySide, Plot only visible symbole, cache rectTarg
2013-09-24 16:12:29 +08:00
Guillaume Poulin
bd43a7508a Rename self.tar to self.target 2013-09-23 17:47:33 +08:00
Guillaume Poulin
c3576b1c09 Some few more optimization to ScatterPlotItem 2013-09-23 16:45:43 +08:00
Guillaume Poulin
f5ee45ac28 Improve ScatterPlotItem
Slightly faster and more memory efficient, correct python 3 bug
2013-09-23 00:45:55 +08:00