I believe I posted this either here or in the issues section on github at 
one time, but I never heard anything so I'm trying again

i have a PlotDataItem and I'm trying to connect the sigPointsClicked signal 
to a function.  

The problem is that when I click on a point, I get the following 
TypeError...

    |    File 
> "/home/jwebster/anaconda3/envs/py3/lib/python3.6/site-packages/pyqtgraph/graphicsItems/ScatterPlotItem.py",
>  
> line 817, in pointsAt
>     |      s2x = s2y = ss * 0.5
>     |  TypeError: can't multiply sequence by non-int of type 'float'
>


I don't know that this will get fixed anytime soon, and I really need this 
to work

Can someone suggest a workaround?


this is how I create the curve and connect it. 

self.b_curve = pg.PlotDataItem(x=self.t,
                                            y=self.b,
                                            pen=None,
                                            brush=bcolor,
                                            symbol=symb,
                                            symbolPen=bcolor,
                                            symbolBrush=bcolor,
                                            symbolSize='5')

self.b_curve.sigPointsClicked.connect(self.pointsClicked)


def pointsClicked(self, points):
    for idx, point in enumerate(points):
        print('{}: x={}, y={}'.format(idx, point.x(), point.y()))



-- 
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/636f49ba-be7a-4399-b28c-2420f5fc7299%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to