2011-04-05 12:53:05 -04:00
|
|
|
# -*- coding: utf-8 -*-
|
2012-03-01 21:55:32 -05:00
|
|
|
## Add path to library (just for examples; you do not need this)
|
2012-12-26 17:51:52 -05:00
|
|
|
import initExample
|
2011-04-05 12:53:05 -04:00
|
|
|
|
|
|
|
import numpy as np
|
2012-03-01 22:53:52 -05:00
|
|
|
from pyqtgraph.Qt import QtGui, QtCore
|
2011-04-05 12:53:05 -04:00
|
|
|
import pyqtgraph as pg
|
|
|
|
|
|
|
|
|
2021-01-27 10:59:07 -08:00
|
|
|
app = pg.mkQApp("Gradiant Editor Example")
|
2012-03-01 21:55:32 -05:00
|
|
|
mw = pg.GraphicsView()
|
2011-06-14 19:47:52 -04:00
|
|
|
mw.resize(800,800)
|
2012-03-01 21:55:32 -05:00
|
|
|
mw.show()
|
2011-04-05 12:53:05 -04:00
|
|
|
|
2012-03-01 21:55:32 -05:00
|
|
|
#ts = pg.TickSliderItem()
|
|
|
|
#mw.setCentralItem(ts)
|
|
|
|
#ts.addTick(0.5, 'r')
|
|
|
|
#ts.addTick(0.9, 'b')
|
2011-04-05 12:53:05 -04:00
|
|
|
|
2012-03-01 21:55:32 -05:00
|
|
|
ge = pg.GradientEditorItem()
|
|
|
|
mw.setCentralItem(ge)
|
2011-04-05 12:53:05 -04:00
|
|
|
|
2012-12-05 00:25:45 -05:00
|
|
|
if __name__ == '__main__':
|
2021-05-14 05:28:22 +08:00
|
|
|
pg.exec()
|