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
|
|
|
|
|
|
|
|
|
2021-01-27 18:59:07 +00:00
|
|
|
app = pg.mkQApp("Gradiant Editor Example")
|
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
|
|
|
|
2012-12-05 05:25:45 +00:00
|
|
|
if __name__ == '__main__':
|
2021-05-13 21:28:22 +00:00
|
|
|
pg.exec()
|