You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, constellation labels will be awkwardly to a side (e.g. Hercules, Scutum, Corona Australis) and in some cases, just completely out of the boundary (e.g. Sagitta)
Also could there be labels for both Serpens (either duplicate Serpens labels or have one for Serpens cauda/caput)
image:
code:
fromstarplotimportStar, DSO, MapPlot, Projectionfromstarplot.stylesimportPlotStyle, PolygonStyle, extensionsstyle=PlotStyle().extend(
extensions.BLUE_LIGHT,
extensions.MAP,
)
p=MapPlot(
projection=Projection.MILLER, # specify a non-perspective projectionra_min=14, # limit the map to a specific areara_max=22,
dec_min=-45,
dec_max=65,
style=style,
resolution=4000,
hide_colliding_labels=False
)
p.gridlines() # add gridlinesp.stars(
where=[Star.magnitude<6],
where_labels=[ (Star.magnitude<3)],
bayer_labels=True
)
p.constellations()
p.constellation_borders()
p.milky_way()
p.celestial_equator()
p.ecliptic()
p.export("test.png", padding=0.2, transparent=True)
Environment Details:
Starplot version: v0.11.4
Python version: 3.11.8
Matplotlib version: 3.9.2
The text was updated successfully, but these errors were encountered:
This is a known issue with constellation labels, and something I'm continually trying to improve. This one is tough because it's difficult to come up with a good foolproof way to automatically determine the best positions for labels (which can also change depending on how many objects you plot, the styles, etc). It's easier to do this for points (e.g. stars) cause the label has a much smaller range where it makes sense.
In early versions of Starplot, I just put the constellation label at the centroid of the constellation lines, which works well for some constellations but not all.
Anyway, hopefully I stumble upon a good solution soon. Open to any and all ideas!
currently, the constellation label positions are hard-coded here -- these positions were originally calculated by finding the centroid of each constellation (can't remember if I did it by stars, or boundary) and then manually fine-tuning a bunch of them where the centroid wasn't a good place to put the label. This actually works pretty well for zenith projections, but not great for others (as you've discovered).
Sometimes, constellation labels will be awkwardly to a side (e.g. Hercules, Scutum, Corona Australis) and in some cases, just completely out of the boundary (e.g. Sagitta)
Also could there be labels for both Serpens (either duplicate Serpens labels or have one for Serpens cauda/caput)
image:
code:
Environment Details:
The text was updated successfully, but these errors were encountered: