-
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Work In ProgressbugSomething isn't workingSomething isn't working⭐ on roadmapThis issue is on the roadmap for a future versionThis issue is on the roadmap for a future version
Description
Describe the bug
When using the demo CollisionHandler function and where_labels=[True], the image is generated much larger and the labels are outside the map area.
To Reproduce
from starplot import MapPlot, Stereographic, CollisionHandler, _
from starplot.styles import PlotStyle, extensions
# Create a custom collision handler that ensures labels are ALWAYS plotted
collision_handler = CollisionHandler(
# always plot an object's label, even if it collides with other labels or markers:
plot_on_fail=True,
# only try plotting object labels once:
attempts=1,
)
style = PlotStyle().extend(
extensions.BLUE_LIGHT,
extensions.MAP,
{
},
)
p = MapPlot(
projection = Stereographic(center_ra= 9.5 * 15, center_dec= -45),
ra_min = 7 * 15,
ra_max = 10 * 15,
dec_min = -70,
dec_max = -20,
style = style,
resolution = 4000,
scale = 1,
hide_colliding_labels = False,
autoscale = False,
collision_handler=collision_handler,
)
p.constellations()
p.stars(
where=[_.magnitude <= 7.5],
where_labels=[False],
)
p.open_clusters(
where_labels=[True],
)
p.constellation_labels()
p.export("labels-test-1.png", padding = 0, transparent=True)Expected behavior
Labels printed only within the map area.
Environment Details (please complete the following information):
- Starplot version 0.19.6
- Python version 3.14
- Matplotlib version 3.10.8
- OS: Windows 11 64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Work In ProgressbugSomething isn't workingSomething isn't working⭐ on roadmapThis issue is on the roadmap for a future versionThis issue is on the roadmap for a future version
