plot_altitude

astroplan.plots.plot_altitude(targets, observer, time, ax=None, style_kwargs=None, style_sheet=None, brightness_shading=False, airmass_yaxis=False, min_altitude=0, min_region=None, max_altitude=90, max_region=None)[source]

Plots altitude as a function of time for a given target.

If a Axes object already exists, an additional altitude plot will be “stacked” on it. Otherwise, creates a new Axes object and plots altitude on top of that.

When a scalar Time object is passed in (e.g., Time('2000-1-1')), the resulting plot will use a 24-hour window centered on the time indicated, with altitude sampled at regular intervals throughout. However, the user can control the exact number and frequency of altitude calculations used by passing in a non-scalar Time object. For instance, Time(['2000-1-1 23:00:00', '2000-1-1 23:30:00']) will result in a plot with only two altitude measurements.

For examples with plots, visit the documentation of Time Dependent Plots.

Parameters:

targets : list of FixedTarget objects

The celestial bodies of interest. If a single object is passed it will be converted to a list.

observer : Observer

The person, telescope, observatory, etc. doing the observing.

time : Time

If scalar (e.g., Time('2000-1-1')), will result in plotting target altitudes once an hour over a 24-hour window. If non-scalar (e.g., Time(['2000-1-1']), [Time('2000-1-1')], Time(['2000-1-1', '2000-1-2'])), will result in plotting data at the exact times specified.

ax : Axes or None, optional.

The Axes object to be drawn on. If None, uses the current Axes.

style_kwargs : dict or None, optional.

A dictionary of keywords passed into plot_date to set plotting styles.

style_sheet : dict or None (optional)

matplotlib style sheet to use. To see available style sheets in astroplan, print astroplan.plots.available_style_sheets. Defaults to the light theme.

brightness_shading : bool

Shade background of plot to scale roughly with sky brightness. Dark shading signifies times when the sun is below the horizon. Default is False.

altitude_yaxis : bool

Add alternative y-axis on the right side of the figure with target altitude. Default is False.

min_altitude : float

Lower limit of y-axis altitude range in the plot. Default is 1.0.

max_altitude : float

Upper limit of y-axis altitude range in the plot. Default is 3.0.

min_region : float

If set, defines an interval between min_altitude and min_region that will be shaded. Default is None.

max_region : float

If set, defines an interval between max_altitude and max_region that will be shaded. Default is None.

Returns:

ax : Axes

An Axes object with added altitude vs. time plot.