Hi, I had a similar problem where ImageItems were drawn above the axis lines and tick marks, which I solved by changing the z value of the axes with [ plot.getAxis(ax).setZValue(10) for ax in plot.axes ] I believe that also affects the grid lines. You'll need to play with the value (try -1) to push the axes back in the stack behind the plot lines.
Alternatively, you could probably setZValue(100) on each of your PlotDataItems when you create them to stack them in front of everything else. Patrick On Wednesday 19 June 2024 at 5:23:54 pm UTC+9:30 JJ wrote: > I don't like the grid lines being displayed on top of the curves. What's > the best way to solve this? > > Is it possible to set the Z value of the grid lines in order to change > this? > > I've tried setting the z value of the curves to 1e6 but this doesn't make > any difference. > > -- 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/db0a4af5-e445-4ee5-8382-c2ed55cb72b5n%40googlegroups.com.
