Commit 2a2f19b2 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

bugfixes

parent 1d66063d
...@@ -112,7 +112,18 @@ def plot(*args, **kargs): ...@@ -112,7 +112,18 @@ def plot(*args, **kargs):
#w = PlotWindow() #w = PlotWindow()
#if len(args)+len(kargs) > 0: #if len(args)+len(kargs) > 0:
#w.plot(*args, **kargs) #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) plots.append(w)
w.show() w.show()
return w return w
......
...@@ -32,5 +32,6 @@ anim = a.makeAnimation(loop=-1) ...@@ -32,5 +32,6 @@ anim = a.makeAnimation(loop=-1)
anim.start() anim.start()
## Start Qt event loop unless running in interactive mode or using pyside. ## 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'): if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
app.exec_() app.exec_()
...@@ -38,5 +38,6 @@ img.setDrawKernel(kern, mask=kern, center=(1,1), mode='add') ...@@ -38,5 +38,6 @@ img.setDrawKernel(kern, mask=kern, center=(1,1), mode='add')
img.setLevels([0, 10]) img.setLevels([0, 10])
## Start Qt event loop unless running in interactive mode or using pyside. ## 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'): if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
app.exec_() app.exec_()
...@@ -24,22 +24,22 @@ examples = OrderedDict([ ...@@ -24,22 +24,22 @@ examples = OrderedDict([
])), ])),
('Widgets', OrderedDict([ ('Widgets', OrderedDict([
('PlotWidget', 'PlotWidget.py'), ('PlotWidget', 'PlotWidget.py'),
('SpinBox', '../widgets/SpinBox.py'), #('SpinBox', '../widgets/SpinBox.py'),
('TreeWidget', '../widgets/TreeWidget.py'), ('TreeWidget', '../widgets/TreeWidget.py'),
('DataTreeWidget', '../widgets/DataTreeWidget.py'), ('DataTreeWidget', '../widgets/DataTreeWidget.py'),
('GradientWidget', '../widgets/GradientWidget.py'), ('GradientWidget', '../widgets/GradientWidget.py'),
('TableWidget', '../widgets/TableWidget.py'), #('TableWidget', '../widgets/TableWidget.py'),
('ColorButton', '../widgets/ColorButton.py'), ('ColorButton', '../widgets/ColorButton.py'),
('CheckTable', '../widgets/CheckTable.py'), #('CheckTable', '../widgets/CheckTable.py'),
('VerticalLabel', '../widgets/VerticalLabel.py'), #('VerticalLabel', '../widgets/VerticalLabel.py'),
('JoystickButton', '../widgets/JoystickButton.py'), ('JoystickButton', '../widgets/JoystickButton.py'),
])), ])),
('ImageView', 'ImageView.py'), ('ImageView', 'ImageView.py'),
('GraphicsScene', 'GraphicsScene.py'), ('GraphicsScene', 'GraphicsScene.py'),
('Flowcharts', 'Flowchart.py'), ('Flowcharts', 'Flowchart.py'),
('ParameterTree', '../parametertree'), ('ParameterTree', '../parametertree'),
('Canvas', '../canvas'), #('Canvas', '../canvas'),
('MultiPlotWidget', 'MultiPlotWidget.py'), #('MultiPlotWidget', 'MultiPlotWidget.py'),
]) ])
path = os.path.abspath(os.path.dirname(__file__)) path = os.path.abspath(os.path.dirname(__file__))
......
...@@ -115,7 +115,7 @@ class Exporter(object): ...@@ -115,7 +115,7 @@ class Exporter(object):
return preItems + rootItem + postItems return preItems + rootItem + postItems
def render(self, painter, sourcRect, targetRect, item=None): def render(self, painter, targetRect, sourceRect, item=None):
#if item is None: #if item is None:
#item = self.item #item = self.item
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment