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)
|
2011-04-05 16:53:05 +00:00
|
|
|
import sys, os
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
|
|
|
|
|
|
|
|
import numpy as np
|
|
|
|
from PyQt4 import QtGui, QtCore
|
|
|
|
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.
|
|
|
|
if sys.flags.interactive != 1:
|
|
|
|
app.exec_()
|