pyqtgraph/__init__.py
Luke Campagnola c55392965f Merge from ACQ4:
- Lots of bug fixes
 - API change in PlotItem.plot(...)
 - Started replacing QObjectWorkaround with QWidget
 - Made plotCurveItems clickable
 - Added curve-following arrows
2011-02-07 19:40:38 -05:00

37 lines
772 B
Python

# -*- coding: utf-8 -*-
### import all the goodies and add some helper functions for easy CLI use
from functions import *
from graphicsItems import *
from graphicsWindows import *
#import PlotWidget
#import ImageView
from PyQt4 import QtGui
plots = []
images = []
QAPP = None
def plot(*args, **kargs):
mkQApp()
if 'title' in kargs:
w = PlotWindow(title=kargs['title'])
del kargs['title']
else:
w = PlotWindow()
w.plot(*args, **kargs)
plots.append(w)
w.show()
return w
def show(*args, **kargs):
mkQApp()
w = ImageWindow(*args, **kargs)
images.append(w)
w.show()
return w
def mkQApp():
if QtGui.QApplication.instance() is None:
global QAPP
QAPP = QtGui.QApplication([])