Hello dear, I hope I solved the problem.
What you say is that the cursor path is plotted? This is what I want to do.
I am using a code to get the coordinates of the cursor, but I can not
return the values outside the function, since I want to save them in .csv
I hope someone can help me return the values outside the function.
Thank you very much for your attention.
Code is:
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
Point = []
def mouseMoved(evt):
global Point, cursor2
mousePoint = p.vb.mapSceneToView(evt[0])
Point.append([mousePoint.x(), mousePoint.y()])
#print Point
#print mousePoint.x(), mousePoint.y()
win = pg.GraphicsWindow()
win.resize(700, 600)
p = win.addPlot()
p.setMouseEnabled(x=False, y=False)
p.setXRange(-60, 60, padding=None)
p.setYRange(140, 250, padding=None)
p.showGrid(x=True, y=True, alpha=0.3)
proxy = pg.SignalProxy(p.scene().sigMouseMoved, rateLimit=60, slot=mouseMoved)
if __name__ == '__main__':
import sys
if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
QtGui.QApplication.instance().exec_()
Best regards!!
Daniel Araya Rocha
--
You received this message because you are subscribed to the Google Groups
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyqtgraph/05e54547-d9e0-4c08-a437-d5bedf18b919%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.