Skip to content

ZenithPlot

Zenith plots show the entire sky as seen from a specific time and place. They're also often called "star charts" or "all-sky charts." Starplot calls them zenith plots because the zenith is at the center of the plot.

Stars on zenith plots are plotted in their astrometric positions.

starplot.ZenithPlot

ZenithPlot(
    observer: Observer = None,
    ephemeris: str = "de421.bsp",
    style: PlotStyle = DEFAULT_MAP_STYLE,
    resolution: int = 4096,
    collision_handler: CollisionHandler = None,
    scale: float = 1.0,
    autoscale: bool = False,
    suppress_warnings: bool = True,
    *args,
    **kwargs
)

Creates a new zenith plot.

Parameters:

  • observer (Observer, default: None ) –

    Observer instance which specifies a time and place. Defaults to Observer()

  • ephemeris (str, default: 'de421.bsp' ) –

    Ephemeris to use for calculating planet positions (see Skyfield's documentation for details)

  • style (PlotStyle, default: DEFAULT_MAP_STYLE ) –

    Styling for the plot (colors, sizes, fonts, etc). If None, it defaults to PlotStyle()

  • resolution (int, default: 4096 ) –

    Size (in pixels) of largest dimension of the map

  • collision_handler (CollisionHandler, default: None ) –

    Default CollisionHandler for the plot that describes what to do on label collisions with other labels, markers, etc.

  • scale (float, default: 1.0 ) –

    Scaling factor that will be applied to all sizes in styles (e.g. font size, marker size, line widths, etc). For example, if you want to make everything 2x bigger, then set the scale to 2. At scale=1 and resolution=4096 (the default), all sizes are optimized visually for a map that covers 1-3 constellations. So, if you're creating a plot of a larger extent, then it'd probably be good to decrease the scale (i.e. make everything smaller) -- and increase the scale if you're plotting a very small area.

  • autoscale (bool, default: False ) –

    If True, then the scale will be set automatically based on resolution.

  • suppress_warnings (bool, default: True ) –

    If True (the default), then all warnings will be suppressed

Returns:

  • ZenithPlot

    A new instance of a ZenithPlot

ax instance-attribute

ax: Axes

The underlying Matplotlib axes that everything is plotted on.

Important: Most Starplot plotting functions also specify a transform based on the plot's projection when plotting things on the Matplotlib Axes instance, so use this property at your own risk!

collision_handler instance-attribute

collision_handler: CollisionHandler = collision_handler or CollisionHandler()

Default collision handler for the plot.

fig instance-attribute

fig: Figure

The underlying Matplotlib figure that the axes is drawn on.

magnitude_range property

magnitude_range: tuple[float, float]

Range of magnitude for all plotted stars, as a tuple (min, max)

objects property

objects: ObjectList

Returns an ObjectList that contains various lists of sky objects that have been plotted.

style instance-attribute

style: PlotStyle = style or PlotStyle()

The plot's style.

arrow

arrow(
    origin: tuple[float, float] = None,
    target: tuple[float, float] = None,
    style: ArrowStyle = None,
    scale: float = 0.99,
    length: float = 5,
    max_attempts: int = 100,
)

Plots an arrow from one point to another if you specify both origin and target. If you only specify a target, then the arrow will serve as a "pointer" to that target.

Parameters:

  • origin (tuple[float, float], default: None ) –

    Starting point (ra, dec)

  • target (tuple[float, float], default: None ) –

    Target of the arrow (ra, dec)

  • style (ArrowStyle, default: None ) –

    Style of the arrow

  • scale (float, default: 0.99 ) –

    Scaling factor for the arrow, to make it offset from the origin/target

  • length (float, default: 5 ) –

    If you only specify a target, then this will be the length of the arrow (in degrees). This value is ignored if you're plotting an arrow from one point to another.

  • max_attempts (int, default: 100 ) –

    If you only specify a target, then this will be the max number of attempts for plotting the arrow without colliding with labels. Arrow will be plotted on the final attempt.

bright_nebula

bright_nebula(**kwargs)

Plots the following nebula DSO types:

  • Nebula
  • Emission Nebula
  • Star Cluster Nebula
  • Reflection Nebula
  • HII Ionized Regions

This is just a small wrapper around the dsos() function, so any kwargs will be passed through.

celestial_equator

celestial_equator(
    style: PathStyle = None,
    label: str = "CELESTIAL EQUATOR",
    collision_handler: CollisionHandler = None,
)

Plots the celestial equator

Parameters:

  • style (PathStyle, default: None ) –

    Styling of the celestial equator. If None, then the plot's style will be used

  • label (str, default: 'CELESTIAL EQUATOR' ) –

    How the celestial equator will be labeled on the plot

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on label collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

circle

circle(
    center: tuple,
    radius_degrees: float,
    style: PolygonStyle,
    num_pts: int = 100,
    legend_label: str = None,
    **kwargs
)

Plots a circle

Parameters:

  • center (tuple) –

    Center of circle (ra, dec)

  • radius_degrees (float) –

    Radius of circle (degrees)

  • style (PolygonStyle) –

    Style of circle

  • num_pts (int, default: 100 ) –

    Number of points to calculate for the circle polygon

  • legend_label (str, default: None ) –

    Label for this object in the legend

close_fig

close_fig() -> None

Closes the underlying matplotlib figure.

constellation_borders

constellation_borders(
    style: LineStyle = None, catalog: Catalog = CONSTELLATION_BORDERS
)

Plots the constellation borders

Parameters:

  • style (LineStyle, default: None ) –

    Styling of the constellation borders. If None, then the plot's style (specified when creating the plot) will be used

  • catalog (Catalog, default: CONSTELLATION_BORDERS ) –

    Catalog to use for constellation borders

constellation_labels

constellation_labels(
    style: LabelStyle = None,
    label_fn: Callable[[Constellation], str] = get_label,
    collision_handler: CollisionHandler = None,
)

Plots constellation labels for all constellations that have been plotted. This means you must plot the constellations before plotting their labels.

It's good to plot these last because they're area-based labels (vs point-based, like for star names), and area-based labels have more freedom to move around. If you plot area-based labels first, then it would limit the available space for point-based labels.

Parameters:

  • style (LabelStyle, default: None ) –

    Styling of the constellation labels. If None, then the plot's style (specified when creating the plot) will be used

  • label_fn (Callable[[Constellation], str], default: get_label ) –

    Callable for determining the label for each constellation. The default function returns the constellation's name in uppercase.

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on collisions with other labels, markers, etc. If None, then CollisionHandler(allow_constellation_line_collisions=True) will be used (Important: this function does NOT default to the plot's collision handler, since it's the only area-based label function and collisions should be handled differently).

constellations

constellations(
    style: LineStyle = None,
    where: list = None,
    sql: str = None,
    catalog: Catalog = CONSTELLATIONS_IAU,
)

Plots the constellation lines only. To plot constellation borders and/or labels, see separate functions for them.

Important: If you're plotting the constellation lines, then it's good to plot them first, because Starplot will use the constellation lines to determine where to place labels that are plotted afterwards (labels will look better if they're not crossing a constellation line).

Parameters:

  • style (LineStyle, default: None ) –

    Styling of the constellations. If None, then the plot's style (specified when creating the plot) will be used

  • where (list, default: None ) –

    A list of expressions that determine which constellations to plot. See Selecting Objects for details.

  • sql (str, default: None ) –

    SQL query for selecting constellations (table name is _). This query will be applied after any filters in the where kwarg.

  • catalog (Catalog, default: CONSTELLATIONS_IAU ) –

    The catalog of constellations to use -- see catalogs overview for details

dark_nebula

dark_nebula(**kwargs)

Plots dark nebula

This is just a small wrapper around the dsos() function, so any kwargs will be passed through.

dsos

dsos(
    where: list = None,
    where_labels: list = None,
    where_true_size: list = None,
    legend_labels: Mapping[DsoType, str] = DSO_LEGEND_LABELS,
    alpha_fn: Callable[[DSO], float] = None,
    label_fn: Callable[[DSO], str] = get_label,
    sql: str = None,
    sql_labels: str = None,
    catalog: Catalog = OPEN_NGC,
    collision_handler: CollisionHandler = None,
)

Plots Deep Sky Objects (DSOs).

Parameters:

  • where (list, default: None ) –

    A list of expressions that determine which DSOs to plot. See Selecting Objects for details.

  • where_labels (list, default: None ) –

    A list of expressions that determine which DSOs are labeled on the plot. By default all DSOs are labeled. See Selecting Objects for details.

  • where_true_size (list, default: None ) –

    A list of expressions that determine which DSOs are plotted as their true apparent size in the sky. By default all DSOs are plotted as their true size.

  • legend_labels (Mapping[DsoType, str], default: DSO_LEGEND_LABELS ) –

    A dictionary that maps a DsoType to the legend label that'll be plotted for that type of DSO. If you want to hide all DSO legend labels, then set this arg to None.

  • alpha_fn (Callable[[DSO], float], default: None ) –

    Callable for calculating the alpha value (aka "opacity") of each DSO. If None, then the marker style's alpha will be used.

  • label_fn (Callable[[DSO], str], default: get_label ) –

    Callable for determining the label of each DSO.

  • sql (str, default: None ) –

    SQL query for selecting DSOs (table name is _). This query will be applied after any filters in the where kwarg.

  • sql_labels (str, default: None ) –

    SQL query for selecting DSOs that will be labeled (table name is _). Applied after any filters in the where_labels kwarg.

  • catalog (Catalog, default: OPEN_NGC ) –

    The catalog of DSOs to use -- see catalogs overview for details

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on label collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

ecliptic

ecliptic(
    style: PathStyle = None,
    label: str = "ECLIPTIC",
    collision_handler: CollisionHandler = None,
)

Plots the ecliptic

Parameters:

  • style (PathStyle, default: None ) –

    Styling of the ecliptic. If None, then the plot's style will be used

  • label (str, default: 'ECLIPTIC' ) –

    How the ecliptic will be labeled on the plot

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on label collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

ellipse

ellipse(
    center: tuple,
    height_degrees: float,
    width_degrees: float,
    style: PolygonStyle,
    angle: float = 0,
    num_pts: int = 100,
    start_angle: int = 0,
    end_angle: int = 360,
    legend_label: str = None,
    **kwargs
)

Plots an ellipse

Parameters:

  • center (tuple) –

    Center of ellipse (ra, dec)

  • height_degrees (float) –

    Height of ellipse (degrees)

  • width_degrees (float) –

    Width of ellipse (degrees)

  • style (PolygonStyle) –

    Style of ellipse

  • angle (float, default: 0 ) –

    Angle of rotation clockwise (degrees)

  • num_pts (int, default: 100 ) –

    Number of points to calculate for the ellipse polygon

  • start_angle (int, default: 0 ) –

    Angle to start at

  • end_angle (int, default: 360 ) –

    Angle to end at

  • legend_label (str, default: None ) –

    Label for this object in the legend

export

export(filename: str, padding: float = 0, **kwargs)

Exports the plot to an image file.

Parameters:

  • filename (str) –

    Filename of exported file (the format will be inferred from the extension)

  • padding (float, default: 0 ) –

    Padding (in inches) around the image

  • **kwargs

    Any keyword arguments to pass through to matplotlib's savefig method

galaxies

galaxies(**kwargs)

Plots galaxy DSO types:

  • Galaxy
  • Galaxy Pair
  • Galaxy Triplet

This is just a small wrapper around the dsos() function, so any kwargs will be passed through.

globular_clusters

globular_clusters(**kwargs)

Plots globular clusters

This is just a small wrapper around the dsos() function, so any kwargs will be passed through.

gridlines

gridlines(
    style: PathStyle = None,
    labels: bool = True,
    ra_locations: list[float] = None,
    dec_locations: list[float] = None,
    ra_formatter_fn: Callable[[float], str] = None,
    dec_formatter_fn: Callable[[float], str] = None,
    tick_marks: bool = False,
    ra_tick_locations: list[float] = None,
    dec_tick_locations: list[float] = None,
)

Plots gridlines

Parameters:

  • style (PathStyle, default: None ) –

    Styling of the gridlines. If None, then the plot's style (specified when creating the plot) will be used

  • labels (bool, default: True ) –

    If True, then labels for each gridline will be plotted on the outside of the axes.

  • ra_locations (list[float], default: None ) –

    List of Right Ascension locations for the gridlines (in degrees, 0...360). Defaults to every 15 degrees.

  • dec_locations (list[float], default: None ) –

    List of Declination locations for the gridlines (in degrees, -90...90). Defaults to every 10 degrees.

  • ra_formatter_fn (Callable[[float], str], default: None ) –

    Callable for creating labels of right ascension gridlines

  • dec_formatter_fn (Callable[[float], str], default: None ) –

    Callable for creating labels of declination gridlines

  • tick_marks (bool, default: False ) –

    If True, then tick marks will be plotted outside the axis. Only supported for rectangular projections (e.g. Mercator, Miller)

  • ra_tick_locations (list[float], default: None ) –

    List of Right Ascension locations for the tick marks (in degrees, 0...260)

  • dec_tick_locations (list[float], default: None ) –

    List of Declination locations for the tick marks (in degrees, -90...90)

horizon

horizon(style: PathStyle = None, labels: list = ['N', 'E', 'S', 'W'])

Draws a great circle representing the horizon for the given lat, lon at time dt (so you must define these when creating the plot to use this function)

Parameters:

  • style (PathStyle, default: None ) –

    Style of the horizon path. If None, then the plot's style definition will be used.

  • labels (list, default: ['N', 'E', 'S', 'W'] ) –

    List of labels for cardinal directions. NOTE: labels should be in the order: North, East, South, West.

in_bounds cached

in_bounds(ra: float, dec: float) -> bool

Determine if a coordinate is within the bounds of the plot.

Parameters:

  • ra (float) –

    Right ascension, in degrees (0...360)

  • dec (float) –

    Declination, in degrees (-90...90)

Returns:

  • bool

    True if the coordinate is in bounds, otherwise False

info

info(style: LabelStyle = None)

Plots info text in the lower left corner, including date/time and lat/lon.

Parameters:

  • style (LabelStyle, default: None ) –

    Styling of the info text. If None, then the plot's style definition will be used.

legend

legend(title: str = 'Legend', style: LegendStyle = None)

Plots the legend.

If the legend is already plotted, then it'll be removed first and then plotted again. So, it's safe to call this function multiple times if you need to 'refresh' the legend.

Parameters:

  • title (str, default: 'Legend' ) –

    Title of the legend, which will be plotted at the top

  • style (LegendStyle, default: None ) –

    Styling of the legend. If None, then the plot's style (specified when creating the plot) will be used

line

line(coordinates: list[tuple[float, float]], style: LineStyle, **kwargs)

Plots a line

Parameters:

  • coordinates (list[tuple[float, float]]) –

    List of coordinates, e.g. [(ra, dec), (ra, dec)]

  • style (LineStyle) –

    Style of the line

marker

marker(
    ra: float,
    dec: float,
    style: Union[dict, ObjectStyle],
    label: Optional[str] = None,
    legend_label: str = None,
    skip_bounds_check: bool = False,
    collision_handler: CollisionHandler = None,
    **kwargs
) -> None

Plots a marker

Parameters:

  • ra (float) –

    Right ascension of the marker

  • dec (float) –

    Declination of the marker

  • label (Optional[str], default: None ) –

    Label for the marker

  • style (Union[dict, ObjectStyle]) –

    Styling for the marker

  • legend_label (str, default: None ) –

    How to label the marker in the legend. If None, then the marker will not be added to the legend

  • skip_bounds_check (bool, default: False ) –

    If True, then don't check the marker coordinates to ensure they're within the bounds of the plot. If you're plotting many markers, setting this to True can speed up plotting time.

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on label collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

messier

messier(**kwargs)

Plots Messier objects

This is just a small wrapper around the dsos() function, so any kwargs will be passed through.

milky_way

milky_way(style: PolygonStyle = None, catalog: Catalog = MILKY_WAY)

Plots the Milky Way

Parameters:

  • style (PolygonStyle, default: None ) –

    Styling of the Milky Way. If None, then the plot's style (specified when creating the plot) will be used

  • catalog (Catalog, default: MILKY_WAY ) –

    Catalog to use for Milky Way polygons

moon

moon(
    style: ObjectStyle = None,
    true_size: bool = False,
    show_phase: bool = False,
    label: str = "Moon",
    legend_label: str = "Moon",
    collision_handler: CollisionHandler = None,
) -> None

Plots the Moon.

If you specified a lat/lon when creating the plot (e.g. for perspective projections or optic plots), then the Moon's apparent RA/DEC will be calculated.

Parameters:

  • style (ObjectStyle, default: None ) –

    Styling of the Moon. If None, then the plot's style (specified when creating the plot) will be used

  • true_size (bool, default: False ) –

    If True, then the Moon's true apparent size in the sky will be plotted as a circle (the marker style's symbol will be ignored). If False, then the style's marker size will be used.

  • show_phase (bool, default: False ) –

    If True, and if true_size = True, then the approximate phase of the moon will be illustrated. The dark side of the moon will be colored with the marker's edge_color.

  • label (str, default: 'Moon' ) –

    How the Moon will be labeled on the plot

  • legend_label (str, default: 'Moon' ) –

    How the Moon will be labeled in the legend

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on label collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

nebula

nebula(**kwargs)

Plots all nebula DSO types (except for dark nebulae):

  • Nebula
  • Emission Nebula
  • Star Cluster Nebula
  • Reflection Nebula
  • HII Ionized Regions
  • Planetary Nebula

This is just a small wrapper around the dsos() function, so any kwargs will be passed through.

open_clusters

open_clusters(**kwargs)

Plots open clusters

This is just a small wrapper around the dsos() function, so any kwargs will be passed through.

optic_fov

optic_fov(ra: float, dec: float, optic: Optic, style: PolygonStyle = None)

Draws a polygon representing the field of view for an optic, centered at a specific point.

Parameters:

  • ra (float) –

    Right ascension of the center of view

  • dec (float) –

    Declination of the center of view

  • optic (Optic) –

    Instance of an Optic

  • style (PolygonStyle, default: None ) –

    style of the polygon

planetary_nebula

planetary_nebula(**kwargs)

Plots planetary nebula

This is just a small wrapper around the dsos() function, so any kwargs will be passed through.

planets

planets(
    style: ObjectStyle = None,
    true_size: bool = False,
    labels: Dict[PlanetName, str] = PLANET_LABELS_DEFAULT,
    legend_label: str = "Planet",
    collision_handler: CollisionHandler = None,
) -> None

Plots the planets.

If you specified a lat/lon when creating the plot (e.g. for perspective projections or optic plots), then the planet's apparent RA/DEC will be calculated.

Parameters:

  • style (ObjectStyle, default: None ) –

    Styling of the planets. If None, then the plot's style (specified when creating the plot) will be used

  • true_size (bool, default: False ) –

    If True, then each planet's true apparent size in the sky will be plotted. If False, then the style's marker size will be used.

  • labels (Dict[PlanetName, str], default: PLANET_LABELS_DEFAULT ) –

    How the planets will be labeled on the plot and legend. If not specified, then the planet's name will be used (see [Planet][starplot.models.planet.PlanetName])

  • legend_label (str, default: 'Planet' ) –

    How to label the planets in the legend. If None, then the planets will not be added to the legend

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on label collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

polygon

polygon(
    style: PolygonStyle,
    points: list = None,
    geometry: Polygon = None,
    legend_label: str = None,
    **kwargs
)

Plots a polygon.

Must pass in either points or geometry (but not both).

Parameters:

  • style (PolygonStyle) –

    Style of polygon

  • points (list, default: None ) –

    List of polygon points [(ra, dec), ...] - must be in counterclockwise order

  • geometry (Polygon, default: None ) –

    A shapely Polygon. If this value is passed, then the points kwarg will be ignored.

  • legend_label (str, default: None ) –

    Label for this object in the legend

rectangle

rectangle(
    center: tuple,
    height_degrees: float,
    width_degrees: float,
    style: PolygonStyle,
    angle: float = 0,
    legend_label: str = None,
    **kwargs
)

Plots a rectangle

Parameters:

  • center (tuple) –

    Center of rectangle (ra, dec)

  • height_degrees (float) –

    Height of rectangle (degrees)

  • width_degrees (float) –

    Width of rectangle (degrees)

  • style (PolygonStyle) –

    Style of rectangle

  • angle (float, default: 0 ) –

    Angle of rotation clockwise (degrees)

  • legend_label (str, default: None ) –

    Label for this object in the legend

star_magnitude_scale

star_magnitude_scale(
    title: str = "Star Magnitude",
    style: LegendStyle = None,
    size_fn: Callable[[Star], float] = size_by_magnitude,
    label_fn: Callable[float, str] = lambda m: str(m),
    start: float = -1,
    stop: float = 9,
    step: float = 1,
    add_to_legend: bool = False,
)

Plots a magnitude scale for stars.

Experimental

This is currently an "experimental" feature, which means it's likely to be changed and improved in upcoming versions of Starplot. It also means the feature likely has limitations.

Help us improve this feature by submitting feedback on GitHub (open an issue) or chat with us on Discord. Thanks!

Current Limitations

  • Only supports size functions that determine size based on magnitude only
  • Only supports default marker for stars (point)
  • Labels can only be plotted to the right of the marker
  • Does not automatically determine the magnitude range of the stars you already plotted

Parameters:

  • title (str, default: 'Star Magnitude' ) –

    Title of the legend, which will be plotted at the top

  • style (LegendStyle, default: None ) –

    Styling of the magnitude scale. If None, then the plot's legend style will be used

  • size_fn (Callable[[Star], float], default: size_by_magnitude ) –

    Size function for the star markers

  • label_fn (Callable[float, str], default: lambda m: str(m) ) –

    Function to determine the label for each magnitude

  • start (float, default: -1 ) –

    Starting magnitude

  • stop (float, default: 9 ) –

    Stop point (exclusive)

  • step (float, default: 1 ) –

    Step-size of each scale entry (i.e. how much to increment each step)

  • add_to_legend (bool, default: False ) –

    If True, the scale will be added to the bottom of the legend (and if the legend isn't already plotted, then it'll plot the legend)

stars

stars(
    where: list = None,
    where_labels: list = None,
    catalog: Catalog | Path | str = BIG_SKY_MAG11,
    style: ObjectStyle = None,
    size_fn: Callable[[Star], float] = size_by_magnitude,
    alpha_fn: Callable[[Star], float] = None,
    color_fn: Callable[[Star], str] = None,
    label_fn: Callable[[Star], str] = get_label,
    legend_label: str = "Star",
    bayer_labels: bool = False,
    flamsteed_labels: bool = False,
    sql: str = None,
    sql_labels: str = None,
    collision_handler: CollisionHandler = None,
)

Plots stars

Parameters:

  • where (list, default: None ) –

    A list of expressions that determine which stars to plot. See Selecting Objects for details.

  • where_labels (list, default: None ) –

    A list of expressions that determine which stars are labeled on the plot (this includes all labels: name, Bayer, and Flamsteed). If you want to hide all labels, then set this arg to [False]. See Selecting Objects for details.

  • catalog (Catalog | Path | str, default: BIG_SKY_MAG11 ) –

    The catalog of stars to use -- see catalogs overview for details

  • style (ObjectStyle, default: None ) –

    If None, then the plot's style for stars will be used

  • size_fn (Callable[[Star], float], default: size_by_magnitude ) –

    Callable for calculating the marker size of each star. If None, then the marker style's size will be used.

  • alpha_fn (Callable[[Star], float], default: None ) –

    Callable for calculating the alpha value (aka "opacity") of each star. If None, then the marker style's alpha will be used.

  • color_fn (Callable[[Star], str], default: None ) –

    Callable for calculating the color of each star. If None, then the marker style's color will be used.

  • label_fn (Callable[[Star], str], default: get_label ) –

    Callable for determining the label of each star.

  • legend_label (str, default: 'Star' ) –

    Label for stars in the legend. If None, then they will not be in the legend.

  • bayer_labels (bool, default: False ) –

    If True, then Bayer labels for stars will be plotted.

  • flamsteed_labels (bool, default: False ) –

    If True, then Flamsteed number labels for stars will be plotted.

  • sql (str, default: None ) –

    SQL query for selecting stars (table name is _). This query will be applied after any filters in the where kwarg.

  • sql_labels (str, default: None ) –

    SQL query for selecting stars that will be labeled (table name is _). Applied after any filters in the where_labels kwarg.

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on label collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

sun

sun(
    style: ObjectStyle = None,
    true_size: bool = False,
    label: str = "Sun",
    legend_label: str = "Sun",
    collision_handler: CollisionHandler = None,
) -> None

Plots the Sun.

If you specified a lat/lon when creating the plot (e.g. for perspective projections or optic plots), then the Sun's apparent RA/DEC will be calculated.

Parameters:

  • style (ObjectStyle, default: None ) –

    Styling of the Sun. If None, then the plot's style (specified when creating the plot) will be used

  • true_size (bool, default: False ) –

    If True, then the Sun's true apparent size in the sky will be plotted as a circle (the marker style's symbol will be ignored). If False, then the style's marker size will be used.

  • label (str, default: 'Sun' ) –

    How the Sun will be labeled on the plot

  • legend_label (str, default: 'Sun' ) –

    How the sun will be labeled in the legend

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on label collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

text

text(
    text: str,
    ra: float,
    dec: float,
    style: LabelStyle = None,
    collision_handler: CollisionHandler = None,
    **kwargs
)

Plots text

Parameters:

  • text (str) –

    Text to plot

  • ra (float) –

    Right ascension of text (0...360)

  • dec (float) –

    Declination of text (-90...90)

  • style (LabelStyle, default: None ) –

    Styling of the text

  • collision_handler (CollisionHandler, default: None ) –

    An instance of CollisionHandler that describes what to do on collisions with other labels, markers, etc. If None, then the collision handler of the plot will be used.

title

title(text: str, style: LabelStyle = None)

Plots a title at the top of the plot

Parameters:

  • text (str) –

    Title text to plot

  • style (LabelStyle, default: None ) –

    Styling of the title. If None, then the plot's style (specified when creating the plot) will be used

zenith

zenith(
    style: ObjectStyle = None, label: str = None, legend_label: str = "Zenith"
)

Plots a marker for the zenith (requires lat, lon, and dt to be defined when creating the plot)

Parameters:

  • style (ObjectStyle, default: None ) –

    Style of the zenith marker. If None, then the plot's style definition will be used.

  • label (str, default: None ) –

    Label for the zenith

  • legend_label (str, default: 'Zenith' ) –

    Label in the legend