pyqtgraph/examples/test_Arrow.py
Luke Campagnola 4d846e2aad Updates merged from acq4:
- disabled opengl (performance issues in Qt 4.7)
 - numerous caching changes (disabled deviceCoordinateCache due to performance issues)
 - speed up loading large images in ImageView
 - bugfixes from Ingo Breßler
 - Transform rotation bugfix
 - Added debug module
 - Major performance enhancements for scatterplot, fixed point clicking issues
     ** API change for scatterplot click signals
 - Drawing on ImageItem is working well now
 - PlotItem downsampling no longer uses scipy.signal.resample (this was creating artifacts)
 - Fixed ViewBox behavior when aspect-locked
2011-06-14 19:47:52 -04:00

30 lines
660 B
Python
Executable File

# -*- coding: utf-8 -*-
## Add path to library (just for examples; you do not need this)
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([])
mw = QtGui.QMainWindow()
mw.resize(800,800)
p = pg.PlotWidget()
mw.setCentralWidget(p)
c = p.plot(x=np.sin(np.linspace(0, 2*np.pi, 100)), y=np.cos(np.linspace(0, 2*np.pi, 100)))
a = pg.CurveArrow(c)
p.addItem(a)
mw.show()
anim = a.makeAnimation(loop=-1)
anim.start()
## Start Qt event loop unless running in interactive mode.
if sys.flags.interactive != 1:
app.exec_()