z-order of gridlines
Describe the bug Despite the gridlines.line.zorder being lower than that of the stars, the gridlines are still above the star
To Reproduce
from starplot import Star, DSO, MapPlot, Projection
from starplot.styles import PlotStyle, PolygonStyle, extensions
style = PlotStyle().extend(
extensions.BLUE_LIGHT,
extensions.MAP,
)
p = MapPlot(
projection=Projection.STEREO_NORTH,
dec_min=75,
dec_max=90,
style=style,
resolution=4000,
hide_colliding_labels=False
)
p.gridlines()
p.stars(
where=[Star.magnitude < 6],
where_labels=[ Star.magnitude == 999],
bayer_labels=True
)
p.export("test.png", padding=0.2, transparent=True)
Expected behavior
The gridlines should be below the star, but they are above the star
Screenshots
Polaris has gridlines on it
Environment Details (please complete the following information):
- Starplot version: 0.12.1
- Python version: 3.11.8
- Matplotlib version: 3.9.2
Which version of cartopy are you using? I've noticed this behavior with versions 0.23 or later, but not with version 0.22. So, I suspect this may be a bug with cartopy, but haven't fully investigated to confirm.
currently mine is on 0.23.0
I finally investigated this with newer versions of cartopy (I'm using 0.25 now), and figured out a solution to this problem. I think it was introduced when cartopy refactored a lot of their gridlines stuff in a recent version. Anyway, this will be fixed in the new Starplot version (0.16, set to release in a few days).