Skip to content

Celestial Sphere

Plot

Celestial Sphere SVG / PNG

The entire celestial sphere, showing all the stars you can theoretically see with your naked eye (magnitude 6).

Also shows all 110 Messier objects, which are some of the most popular targets for amateur astronomers.

Plotted in a Mollweide projection.


Source Code

Python 3.12 Starplot 0.16.5
from starplot import (
    MapPlot,
    Mollweide,
    PlotStyle,
    style_extensions,
    _,
)

style = PlotStyle().extend(
    style_extensions.BLUE_MEDIUM,
    style_extensions.MAP,
)

p = MapPlot(
    projection=Mollweide(),
    style=style,
    autoscale=False,
    resolution=6000,
    scale=0.8,
)

p.constellations()
p.stars(
    where=[_.magnitude < 6],
    where_labels=[_.magnitude < 3],
)
p.messier(
    true_size=False,
    label_fn=lambda d: f"M{d.m}",
)
p.constellation_labels(style__font_size=20)
p.gridlines(labels=False)
p.milky_way()

p.export("plot.svg", format="svg", padding=0.25, transparent=True)