diff --git a/__init__.py b/__init__.py index a8ae98dec74ac99bfa4207586edc7c4b1af5e402..360e217f9de21dd76552c59ea383a1ea1a9a7ef8 100644 --- a/__init__.py +++ b/__init__.py @@ -112,7 +112,18 @@ def plot(*args, **kargs): #w = PlotWindow() #if len(args)+len(kargs) > 0: #w.plot(*args, **kargs) - w = PlotWindow(*args, **kargs) + + pwArgList = ['title', 'label', 'name', 'left', 'right', 'top', 'bottom'] + pwArgs = {} + dataArgs = {} + for k in kargs: + if k in pwArgList: + pwArgs[k] = kargs[k] + else: + dataArgs[k] = kargs[k] + + w = PlotWindow(**pwArgs) + w.plot(*args, **dataArgs) plots.append(w) w.show() return w diff --git a/examples/Arrow.py b/examples/Arrow.py index 446e243eda4bcf4b8d8059a21f9340b43fb4b69c..86f5c8c705c0a1a753cfd0e74b130ff887aa9e10 100755 --- a/examples/Arrow.py +++ b/examples/Arrow.py @@ -32,5 +32,6 @@ anim = a.makeAnimation(loop=-1) anim.start() ## Start Qt event loop unless running in interactive mode or using pyside. +import sys if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'): app.exec_() diff --git a/examples/Draw.py b/examples/Draw.py index 6a9b1323768b716c43eb6eb073cb1731c18066dd..e64b76b62f06eff4ba655d1fb84898642e80070e 100644 --- a/examples/Draw.py +++ b/examples/Draw.py @@ -38,5 +38,6 @@ img.setDrawKernel(kern, mask=kern, center=(1,1), mode='add') img.setLevels([0, 10]) ## Start Qt event loop unless running in interactive mode or using pyside. +import sys if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'): app.exec_() diff --git a/examples/__main__.py b/examples/__main__.py index 95c0ebae4fbf99a7b9dc616ea73dd25b35c3282d..95e948ffd43b0230817a4f918d5ef171d8c0e7cd 100644 --- a/examples/__main__.py +++ b/examples/__main__.py @@ -24,22 +24,22 @@ examples = OrderedDict([ ])), ('Widgets', OrderedDict([ ('PlotWidget', 'PlotWidget.py'), - ('SpinBox', '../widgets/SpinBox.py'), + #('SpinBox', '../widgets/SpinBox.py'), ('TreeWidget', '../widgets/TreeWidget.py'), ('DataTreeWidget', '../widgets/DataTreeWidget.py'), ('GradientWidget', '../widgets/GradientWidget.py'), - ('TableWidget', '../widgets/TableWidget.py'), + #('TableWidget', '../widgets/TableWidget.py'), ('ColorButton', '../widgets/ColorButton.py'), - ('CheckTable', '../widgets/CheckTable.py'), - ('VerticalLabel', '../widgets/VerticalLabel.py'), + #('CheckTable', '../widgets/CheckTable.py'), + #('VerticalLabel', '../widgets/VerticalLabel.py'), ('JoystickButton', '../widgets/JoystickButton.py'), ])), ('ImageView', 'ImageView.py'), ('GraphicsScene', 'GraphicsScene.py'), ('Flowcharts', 'Flowchart.py'), ('ParameterTree', '../parametertree'), - ('Canvas', '../canvas'), - ('MultiPlotWidget', 'MultiPlotWidget.py'), + #('Canvas', '../canvas'), + #('MultiPlotWidget', 'MultiPlotWidget.py'), ]) path = os.path.abspath(os.path.dirname(__file__)) diff --git a/exporters/Exporter.py b/exporters/Exporter.py index 1215e1870ff5999e6a3f954391278578d2640c61..709926d4a40f6b880002c14a217075a3cf9fe7b3 100644 --- a/exporters/Exporter.py +++ b/exporters/Exporter.py @@ -115,7 +115,7 @@ class Exporter(object): return preItems + rootItem + postItems - def render(self, painter, sourcRect, targetRect, item=None): + def render(self, painter, targetRect, sourceRect, item=None): #if item is None: #item = self.item