Hi,

Are the zoom limits where things go wrong realistic? If not, then you could 
try restricting the zoom limits with something like 
plotitem.setLimits(minXRange=1.0, maxXRange=1e6)

Otherwise, is the problem because of a difference in plot vs pixel 
coordinates? That is, a setPosition() call places items on the plot using 
plot coordinates but, because a TextItem stays the same (pixel) size and is 
not scaled with the view, your _hover_label_pos_offset (measured in plot 
coordinates) becomes small/zero as you zoom out, and so isn't enough to 
shift the label down into the plot range.
If that's the case, then you might need to convert coordinate systems, eg 
using the getViewBox().mapFromView() method.

Patrick

On Saturday, 13 April 2019 02:22:05 UTC+9:30, [email protected] wrote:
>
> Oh, that's exactly what I am looking for. I had misinterpreted what it 
> meant.
> Thank you!
>
> However, something else awkward is still happening (it was doing this 
> before). Whenever the x-axis is zoomed far enough out, the label begins 
> to get pushed up (beyond the maximum limit).
> When my x-axis is set large enough relative to the y-axis (x values are 
> changed from velocity to frequency while the y values remain the same), the 
> label is placed above the visible range.
>

-- 
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/c8bc4bf9-b2b1-4947-a015-49ebfbdf2aa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to