Overlaying Scatter Plots on an Image Item

27 views
Skip to first unread message

Nick Torenvliet

unread,
Mar 26, 2019, 6:12:23 PM3/26/19
to pyqtgraph
Hi,

I've got a pg.ImageItem() on pg.GraphicsLayoutWidet().

The image item is a heat map of a surface layed out in 2d (x, y) with the map's heat indicating magnitude in the z direction.  Pretty standard stuff.

The heat map has a moving cross hair that tracks mouse activity in the region on top of it.

I have annotating data for the heat map such that I would like to draw some scatter plots over top of the ImageItem to indicate data quality at specific points on the map.

Another way to do it might be to draw multiple images on top of the heat map with transparency, wherever no annotations exist, to allow the colours of the first heat map to be visible.

Are either of these options possible?   Is there another way I might achieve my goal?

Nick

Patrick

unread,
Mar 26, 2019, 10:06:19 PM3/26/19
to pyqtgraph
Hi,

This is certainly possible. You can just keep adding plot items over the top of the image. See the Image Analysis example, where a ROI is added over the image - you would instead a ScatterPlotItem or similar. You may just need to add things the in correct order (or setZValue on the items later) to keep the plot items over the top of the image etc, which is shown in the example.

Patrick
Reply all
Reply to author
Forward
0 new messages