I'm looking for a way to force a given part of the image to background without having to also change the rest of the parts that compose that image.
Example: I have an image made of a grid, a few lines, a histogram and some scatter points. Even though I'm drawing the grid first, it shows above everything else in the image.
This is the line I use to set the grid:
ax.grid(b=True, which='major', color='gray', linestyle='--', lw=1)
I know I can give the grid a zorder
value of say 1 and higher zorders for the rest of the parts that make up the image, but I have lots of images with lots of grids and other parts. It'd be much easier if I could just give a zorder
to the grid to force it to draw last than having to also edit all the lines, points, etc.