update to plot() function - all arguments are now passed through to PlotWindow.

(this *should* be a backward-compatible change)
This commit is contained in:
Luke Campagnola 2012-03-23 02:45:11 -04:00
parent 3b2ef16071
commit b0d3e9a50b

View File

@ -105,13 +105,14 @@ def plot(*args, **kargs):
| All other arguments are used to plot data. (see :func:`PlotItem.plot() <pyqtgraph.PlotItem.plot>`)
"""
mkQApp()
if 'title' in kargs:
w = PlotWindow(title=kargs['title'])
del kargs['title']
else:
w = PlotWindow()
if len(args)+len(kargs) > 0:
w.plot(*args, **kargs)
#if 'title' in kargs:
#w = PlotWindow(title=kargs['title'])
#del kargs['title']
#else:
#w = PlotWindow()
#if len(args)+len(kargs) > 0:
#w.plot(*args, **kargs)
w = PlotWindow(*args, **kargs)
plots.append(w)
w.show()
return w