Commit Graph

2323 Commits

Author SHA1 Message Date
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
1e82104986 Fixed running python examples --test for python3; needs to be tested under windows. 2013-11-16 21:51:55 -05: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
Luke Campagnola
e84c0d7a93 Merge pull request #11 from anntzer/fast-import
Faster import of PyQtGraph.
2013-11-15 18:18:51 -08: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
5ef8b1d01a Merge branch 'axis_fix' into develop
Fixed improper tick spacing and axis scaling
    This requires an API change:
     - AxisItem.setScale(float) has the usual behavior
     - AxisItem.setScale(None) is deprecated (but still works). 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.

fixes #4
2013-10-18 15:19:49 -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
Guillaume Poulin
26b84693a8 Modify for loop into map in ScatterPlotItem.py 2013-09-22 23:10:18 +08:00
Guillaume Poulin
3a9258e35e Correct comment in examples/ScatterPlot.py 2013-09-20 16:46:33 +08:00
Guillaume Poulin
63bf2b3270 optimize ScatterPlotItem with pxMode=True 2013-09-20 15:46:10 +08:00
Luke Campagnola
54ca31f91b Added ImageExporter error message for zero-size export 2013-09-19 12:13:16 -04:00
Luke Campagnola
d8f9fb0781 Added GLBarGraphItem 2013-09-18 12:27:46 -04:00
Luke Campagnola
8b58416d1d minor edits 2013-09-18 12:27:01 -04:00
Luke Campagnola
029282bb9d Merge branch 'plotdata-nan' into develop
- Removed inf/nan checking from PlotDataItem and PlotCurveItem; improved performance
- Added 'connect' option to PlotDataItem and PlotCurveItem to affect which line segments are drawn
- arrayToQPath() added 'finite' connection mode which omits non-finite values from connections
2013-09-13 03:37:56 -04:00
Luke Campagnola
58048a703c - Removed inf/nan checking from PlotDataItem and PlotCurveItem; improved performance
- Added 'connect' option to PlotDataItem and PlotCurveItem to affect which line segments are drawn
- arrayToQPath() added 'finite' connection mode which omits non-finite values from connections
2013-09-13 03:27:26 -04:00