How to plot the horizontal distance between 2 points on an image with PyQtGraph

94 views
Skip to first unread message

Jack Lilhammers

unread,
Feb 16, 2021, 8:56:01 PM2/16/21
to pyqtgraph
Hello, 

I've already post this question of mine on Stack Overflow with no luck.
I'd like to plot the horizontal distance between 2 points on an image.
I think it a way of doing this would be to use 3 instances of LineSegmentROI and make them look connected as one right arc, because they already have many features that would be great for this idea.  
Like being draggable, which could be very useful to measure a different distance by simply dragging a side.  
The problem are the handles, that can't be removed, or even hidden.  
Has anyone done something like this?

distance.png


Martin Chase

unread,
Mar 4, 2021, 6:49:37 PM3/4/21
to pyqtgraph
Hey Jack,

I see you also answered yourself on stack overflow. I thought it worthwhile to mention RulerROI. It doesn't separate out the axes or draw how you'd like, but that class might help inform your implementation, especially if you're making it interactive.

Good luck!

Jack Lilhammers

unread,
Mar 5, 2021, 4:31:27 AM3/5/21
to pyqtgraph
Thank you, I'll look into it to improve text drawing and alignment
Reply all
Reply to author
Forward
0 new messages