A little more context, for performance reasons a while ago it was decided that grid lines should be drawn (or “painted”) as an extension of AxisItem. This has caused confusion like shown here in the mail list for this very specific issue. Given we have made major performance improvements in the library recently we should probably revisit how bad the performance penalty would be if grid lines were their own thing.
On Mon, Jun 24, 2024 at 10:44 JJ <[email protected]> wrote: > This solves the issue. Thanks! > > On Thursday, June 20, 2024 at 4:09:57 AM UTC+2 Patrick wrote: > >> 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/8b12bb67-3314-4dc5-901a-99e1c1f38886n%40googlegroups.com > <https://groups.google.com/d/msgid/pyqtgraph/8b12bb67-3314-4dc5-901a-99e1c1f38886n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CA%2BnduTHN1PGExxpiYFUdzAB7R3jfN6TrO%2BNtyET1p%3DUrg0AeWg%40mail.gmail.com.
