2011-04-05 16:53:05 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2012-03-02 02:55:32 +00:00
|
|
|
## Add path to library (just for examples; you do not need this)
|
2012-12-26 22:51:52 +00:00
|
|
|
import initExample
|
2011-04-05 16:53:05 +00:00
|
|
|
|
|
|
|
import numpy as np
|
2012-03-02 03:53:52 +00:00
|
|
|
from pyqtgraph.Qt import QtGui, QtCore
|
2011-04-05 16:53:05 +00:00
|
|
|
import pyqtgraph as pg
|
|
|
|
|
|
|
|
|
|
|
|
app = QtGui.QApplication([])
|
2012-03-02 02:55:32 +00:00
|
|
|
mw = pg.GraphicsView()
|
2011-06-14 23:47:52 +00:00
|
|
|
mw.resize(800,800)
|
2012-03-02 02:55:32 +00:00
|
|
|
mw.show()
|
2011-04-05 16:53:05 +00:00
|
|
|
|
2012-03-02 02:55:32 +00:00
|
|
|
#ts = pg.TickSliderItem()
|
|
|
|
#mw.setCentralItem(ts)
|
|
|
|
#ts.addTick(0.5, 'r')
|
|
|
|
#ts.addTick(0.9, 'b')
|
2011-04-05 16:53:05 +00:00
|
|
|
|
2012-03-02 02:55:32 +00:00
|
|
|
ge = pg.GradientEditorItem()
|
|
|
|
mw.setCentralItem(ge)
|
2011-04-05 16:53:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Start Qt event loop unless running in interactive mode.
|
2012-12-05 05:25:45 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys
|
|
|
|
if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
|
|
|
|
QtGui.QApplication.instance().exec_()
|