first, I have some scatter plot items and lines plotted in 3d, is it possible to know when i am clicking on one of the items or get a xyz location of where i am clicking?
second, When zoomed in away from the 0,0,0 coordinate, panning is really difficult and take a long time, has anyone worked with other methods in which to navigate. I noticed in some 3d programs i am using that the panning works equally as fast zoomed in or out and the rotations happen around the current view, not the center point. I assume this could be done in glviewwidget but i wanted to just check if someone had the code before i dive in.
--
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 pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CACZXET8mWCLzjp-1UN1MHo9TJraWsyh_803sSwRjA8_pkrWG-w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
For the navigation I am talking about, i have attached two videos. One shows what happens when I zoom in and try to rotate. Is it possible to keep the camera target with the panning, so that if i pan to the side of the coordinate system my rotation center point changes.
The other problem it shows is a problem with zooming and trying to pan.
I also just noticed that i cant pan up and down, the other video shows that movement in a commercial program.
I have itemsAt working, however, I cant get the mouse location in 3D.
I used this in my window class,
# def mousePressEvent(self, event):
# if event.button() == QtCore.Qt.RightButton:
# self.dragPosition = event.globalPos() - self.frameGeometry().topLeft()
# event.accept()
# print self.dragPosition
and it works, but only for the 2d graph, nothing happens in 3d.
I noticed some mouse events in glviewwidget but I am not sure how to wait for a mouse event in the 3d view in order to invoke them
--
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 pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CACZXET_Oo57ROzzJi9avMNSDVXHsB6ixpOBXnL9j3xG%2BD%2B0ShQ%40mail.gmail.com.
Thanks for the explanation, I let you know what i come up with.For the mouse interaction, I am not too sure about how the mouse overiding works.My main imports for pyqtgraph are:from PyQt4 import QtCore, QtGuiimport pyqtgraph.opengl as glimport pyqtgraph as pgI have a main class that looks like:class MoAnWin(QtGui.QMainWindow, Ui_MoAnWindow):def __init__(self, parent=None):super(MoAnWin, self).__init__(parent=parent)Then the pyqt generated file imports at the bottom,from pyqtgraph.opengl import GLViewWidgetfrom pyqtgraph import TableWidget, PlotWidgetSo far this is all just from following your documentation and help on making the pyqt gui with pyqtgraph
So when I useddef mousePressEvent(self, event):
if event.button() == QtCore.Qt.RightButton:event.accept()
self.dragPosition = event.globalPos() - self.frameGeometry().topLeft()
print self.dragPosition
Inside of my MoAnWin class at the same level as my __init__, only the 2d graph would respond to my mouse clicks. Am i doing something obviously wrong? It seems like I am not specifying the opengl view or the 2d view, how could I do that? Would you be able to give me an example within the scatterplot example of how to print the right mouse click position?
--
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 pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CACZXET8VZjJ23gkiaB3qFapXMCfgy_Wyj8Hdb02r4DHn-mxhmQ%40mail.gmail.com.
The example you gave me crashes so Im not sure what the problem is. I dont get any error, if i run it in your examples window, it just opens and closes, and if I run it as a standalone python file it opens the window but then i get the not responding error.
I am using pyqt designer, and no I do not edit the generated code. I have a main window, which is MoAnWindow, and when the ui is auto generated it is called Ui_MoAnWindow so thats what i inherit into my class called MoAnWin. Inside of Ui_MoAnWindow (the main window) are a few things, including the 2d widget and 3d widget. The 3d widget is called openglwidget. Inside my main class I am able to do the signals and slots that interact with the rest of the program etc.So, when I putdef mousePressEvent(self, ev):print "Pressed button", ev.button(), "at", ev.pos()# If you do not accept the event, then no move/release# events will be received.ev.accept()def mouseMoveEvent(self, ev):print "Mouse dragged to", ev.pos()
def mouseReleaseEvent(self, ev):print "Mouse released."at the first level, outside my class (so it is on the same indentation level), it works, but again, only for the 2d graph, nothing from the opengl is working (i guess this is not overriding the opengl).
--
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 pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CACZXET_k5%2BB%2B%3Dq-SKKobLskf9pJT5%2Br%2BANuStvc%3Dq5tbkK-QJw%40mail.gmail.com.
I am pretty confused, since comparing to your example, the only thing i "show" is the main window.
--
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 pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CACZXET9M5nrqJMGBNw-X9Jkxom39wkg5-Jtx95HhuEH1W6WnOw%40mail.gmail.com.
So I think I figured it out, it seems to be working for now. I wanted to attach the files so anyone else looking to do this can. Maybe luke can confirm this is correct or if it will cause problems later on that I dont know about.
now, im not sure about all the class systems, but from what i was reading everyone was using __init__ and always defining super, etc... maybe this is needed later and I have not tested it enough, but just this basic one at least gets mouse signals. Maybe Luke can elaborate on if this is correct or it does need the super etc...
--
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 pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CACZXET9Xekbi6VTavL_9xo9%3DXxeORG06nphSeFgBCz-CmbtTqw%40mail.gmail.com.