Skip to main content

horizonchart

Clean, 16:9 horizon-view sky charts built on starplot:

  • Finder charts for planets, the Moon, stars or deep-sky objects at a given place and time, showing just enough context (nearby constellations, asterisms, bright stars) to find them.
  • Twilight views for a date: the sky before sunrise and after sunset, looking east or west, whichever has more to see.
  • Meteor shower charts: where a shower's radiant is, with advice on which way to look and when.

Finder chart: Saturn from Monkey's Eyebrow, KY, 10 PM on Oct 2, 2026

Twilight view: looking east before sunrise from Ottawa, ON, Oct 2, 2026

Meteor shower chart: the Leonid radiant from Raleigh, NC, before dawn on Nov 17, 2026

Install

Requires Python 3.11+.

pip install horizonchart

or, from a checkout, with uv: uv sync.

System requirement: Cairo

starplot renders PNGs with CairoSVG, which needs the Cairo graphics library installed on the system:

Platform Install
macOS brew install cairo
Debian / Ubuntu sudo apt install libcairo2
Fedora sudo dnf install cairo
Windows see CairoSVG's notes (a GTK runtime provides it)

On macOS, Pythons that don't look in Homebrew's library folder (such as uv-managed or python.org builds) may report no library called "cairo" was found; point them at it with export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib.

Data files

The first run downloads star and deep-sky catalogs and planetary ephemerides (~120 MB). They, and the place-name cache, are stored in the first of:

  1. $STARPLOT_DATA_PATH, if set
  2. /var/data, if it exists and is writable
  3. the per-user cache folder for your platform (e.g. ~/Library/Caches/horizonchart on macOS, ~/.cache/horizonchart on Linux, %LOCALAPPDATA%\horizonchart\Cache on Windows)

Command line

Finder chart for specific objects

horizonchart target Saturn --location "Monkey's Eyebrow, KY" --time "2026-10-02 22:00"
# -> saturn_20261002T2200_35.78N_78.64W.png

horizonchart target Moon Pleiades -l "35.78N 78.64W" -t "2026-10-03 02:00"

# No --time: 2 hours after tonight's sunset
horizonchart target Saturn -l "35.78N 78.64W"

Targets can be:

Kind Examples
Moon and planets Moon, Mars, Saturn, "saturn barycenter" (BSP-style naming), Pluto
Messier / NGC / IC M31, M45, "NGC 1976", "IC 2391"
Deep-sky common names Pleiades, "Andromeda Galaxy", Beehive
Named stars Vega, Betelgeuse

-t, --time is local time at the location. By default it's 2 hours after today's sunset there, rounded to the nearest half hour. Each target must be above the horizon at that time.

Twilight views for a date

horizonchart twilight --location "Ottawa, ON" --date 2026-10-02
# -> 20261002T0500_45.42N_75.69W_mor.png, 20261002T2030_45.42N_75.69W_eve.png
#    (both moved to 2 hours from the Sun because planets were low at 1 hour)
Option Meaning
-d, --date Date (default: today at the location)
-m, --limiting-magnitude Faintest stars and deep-sky objects shown. Default 2.0 (suburban twilight); 4–6 for dark skies
--no-title Leave off the title ("Looking east, 1 hour before sunrise")

Meteor shower radiant

horizonchart meteors Leonids --location "Raleigh, NC"
# -> leonids_20261117T0500_35.78N_78.64W.png
#    "Leonid Meteor Shower" across the top,
#    "Look southeast 2 hours before sunrise" across the bottom

horizonchart meteors geminids -l "35.78N 78.64W" -d 2026-12-14
# "Look overhead around 2:00 am"

horizonchart meteors orionids -l "35.78N 78.64W" -d 2026-10-21
# "Look overhead after moonset at 2:30 am"

Showers: Quadrantids, Lyrids, Eta Aquariids, Southern Delta Aquariids, Perseids, Orionids, Leonids, Geminids, Ursids ("Leonid", "leonids" and "Leonid meteor shower" all work).

Option Meaning
-d, --date Morning to plan for (default: the next morning of the shower's peak)
-t, --time Local date and time to chart instead of when the radiant is highest
--timestamp Add the date, time and location in the lower right corner
--asterism-labels Name the highlighted asterisms (Sickle of Leo, …)
--constellation-labels Name the constellations

The radiant is circled, with meteors streaking away from it (and no label). Asterisms and constellations are drawn but, unless asked for, not named.

When it's charted and what it advises. "Night" runs from the end of evening civil twilight to the start of morning civil twilight (the Sun 6° below the horizon); nothing is charted or recommended in a brighter sky.

  • By default the chart shows the sky when the radiant is highest during the night, to the nearest half hour, and the advice gives that time: "Look overhead around 2:00 am" (the Geminids).
  • If the radiant is still climbing when morning twilight begins (its highest point comes after that, as with the Leonids), the chart shows 2 hours before sunrise instead and the advice says so: "Look southeast 2 hours before sunrise". Where twilight has already begun 2 hours before sunrise, it's the start of twilight, "before dawn".
  • Weaker showers (under 30 meteors an hour at peak) need a moonless sky: if the Moon sets during the night, before that time, with the radiant already up, the advice is "after moonset at 12:30 am" (rounded to the half hour, or "Midnight") instead.
  • The direction is the eight-point compass direction of the radiant at the charted time, or "overhead" above 70°. --time changes only the time charted.

Peak dates and radiant positions are from the International Meteor Organization's working list; peaks can shift by a day from year to year, so check the IMO's calendar and use --date if needed.

Common options

Option Meaning
-l, --location Coordinates (35.19,-88.99, 47.99N 84.77W) or a place name ("Monkey's Eyebrow, NC", "Wawa, ON")
--tz Time zone name; by default it's looked up from the location
-o, --output-dir Where to write PNGs (default: current directory)
--no-timestamp Leave off the date, time and location in the lower right corner (finder and twilight charts)
--no-labels Leave off all names: planets, the Moon, stars, deep-sky objects, asterisms and constellations

Place names are looked up with OpenStreetMap's Nominatim service, at most one request per second, and cached (horizonchart-geocode.json in the data folder), so each place is looked up once. Coordinates never touch the network. Nominatim's usage policy asks applications to identify themselves; set HORIZONCHART_CONTACT (e.g. to your email address) to include a contact in the request's user agent.

Python

from datetime import date, datetime
from zoneinfo import ZoneInfo

from horizonchart.meteors import plot_meteor_shower
from horizonchart.skyview import plot_targets, plot_twilight_views

plot_targets(47.99, -84.77, ["Saturn"],
             datetime(2026, 10, 2, 22, 0, tzinfo=ZoneInfo("America/New_York")))

plot_twilight_views(47.99, -84.77, date(2026, 10, 2))
# {"morning": Path(...), "evening": Path(...)}

plot_meteor_shower(35.78, -78.64, "Leonids")  # next peak; or pass a date
plot_meteor_shower(35.78, -78.64, "Leonids", date(2026, 11, 17),
                   when=datetime(2026, 11, 17, 3, 0, tzinfo=ZoneInfo("America/New_York")))

# The command line's --no-title, --no-timestamp and --no-labels
plot_targets(..., timestamp=False, labels=False)
plot_twilight_views(..., title=False, timestamp=False, labels=False)

How charts are composed

Both chart types

  • Planet and Moon markers are drawn in roughly their naked-eye colors. Uranus, Neptune and Pluto are drawn smaller and semi-transparent.
  • Asterisms (Great Square, Big Dipper, Summer Triangle, Orion's Belt, …) are highlighted and labeled. When an asterism is essentially its whole constellation (Cassiopeia's W, the Little Dipper), only the constellation is named.
  • Easily recognized constellations (Orion, Ursa Major and Minor, Cassiopeia, Cygnus, Scorpius, Leo, Crux) are shown whenever most of the figure is in view.
  • At most five stars are labeled, chosen from a priority list of well-known names (Polaris, Sirius, Betelgeuse, Vega, …). Other stars are unlabeled.
  • The date, time and location are in small text in the lower right (meteor shower charts only with --timestamp).

Finder charts

  • Constellations are shown only if they contain a target, border it within 3°, or are home to a highlighted asterism.
  • The view is framed automatically around the targets and asterisms.

Twilight views

  • Each view is 1 hour before sunrise or after sunset, rounded to the half hour. If planets or the Moon are low then, 2 hours is tried and used if it shows more.
  • Each view looks east or west, scored by what's in view (planets, the Moon, deep-sky objects, asterisms, bright stars).
  • The title, e.g. "Looking east, 1 hour before sunrise", is drawn on the landscape.

Tuning constants (radii, magnitudes, font sizes, the asterism and priority-star lists) are at the top of src/horizonchart/skyview.py.

Compatibility with starplot

horizonchart draws its charts with starplot's public API, but a few features rely on starplot internals that have no public equivalent yet: keeping labels clear of highlighted asterism lines, detecting whether a label was placed, and converting coordinates for those checks. Because of this, the dependency is pinned to the tested starplot release series (>=0.21.1,<0.22). Update at your own risk.

Tests

uv run pytest

The tests render real charts which require download of significant catalogs on first run and can take a few minutes to run as a result.

Credits

  • starplot by Steve Berardi does the chart drawing, projections and catalogs (stars from Hipparcos/Tycho via its Big Sky catalog, deep-sky objects from OpenNGC). The horizon-view style follows its horizon gradient example.
  • Skyfield by Brandon Rhodes computes sunrise and sunset, planetary magnitudes and alt/az positions, using JPL ephemerides.
  • Place-name lookup uses Nominatim through geopy; geocoding data © OpenStreetMap contributors.
  • Time zones come from timezonefinder.
  • Titles use the Inter typeface by Rasmus Andersson, bundled under the SIL Open Font License (src/horizonchart/fonts/OFL.txt).

License

MIT; see LICENSE. The bundled Inter font is under the SIL Open Font License 1.1.

Metadata

Release files for horizonchart 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for horizonchart 0.2.0
File Size Uploaded Provenance Actions
horizonchart-0.2.0.tar.gz 510.4 kB Without provenance Details for horizonchart-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for horizonchart 0.2.0
File Interpreter ABI Platform Actions
horizonchart-0.2.0-py3-none-any.whl Python 3 none any Details for horizonchart-0.2.0-py3-none-any.whl

Total release size: 1.0 MB

Release files / horizonchart-0.2.0.tar.gz

Download URL horizonchart-0.2.0.tar.gz
Size 510.4 kB
Tags Source
SHA-256 checksum
How to use checksums
56b31bdf21e12a5124d9e78f03c65f368fdbe0b375f3f75021b02b596907e2e3
BLAKE2b-256 checksum
How to use checksums
ee24f8cadafb6917754fc5136ae8ee73a045f4c5444a8a6bdb9826aaa7df848b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release files / horizonchart-0.2.0-py3-none-any.whl

Download URL horizonchart-0.2.0-py3-none-any.whl
Size 512.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac10a86c0de4cb689ae27049a2c17c7c7be40635daeb6b94c3c209a8c7f90d52
BLAKE2b-256 checksum
How to use checksums
008e7ca386ca49a56ea33a6d358b2d7479a9ff387366ddae6f441f6ff2d3b783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Security for horizonchart 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page