bring selected points to the forefront in a scatter plot

21 views
Skip to first unread message

Gonzalo Hernandez

unread,
Nov 8, 2019, 8:48:54 AM11/8/19
to pyqtgraph
Hi all,
I'm trying to highlight selected points in a scatterplots over the rest of them. I'm changing all points brush and pen to a transparent gray, and the selected ones to bright red. The problem I have is that sometimes the selected points lie behind unselected ones and don't show very well. I'd like to bring these points to the top. 

Is there something similar to setZValue() for scatterplot points? 
How would you go about doing something like this?

If I undesrtand it correctly, scatterplots are rendered by creating an image and drawing the points on top of it. We can access the points properties but the image remains the same, specially the point stacking.  Would it be possible to wrap each point in a QGraphicsItem class to have access to setZValue() method?

Thanks,

Gonzalo
Reply all
Reply to author
Forward
0 new messages