import numpy as np from astropy.coordinates import EarthLocation, SkyCoord from astropy.time import Time import astropy.units as u import matplotlib.pyplot as plt from pytz import timezone from astroplan import Observer, FixedTarget from astroplan.plots import plot_sky longitude = '-155d28m48.900s' latitude = '+19d49m42.600s' elevation = 4163 * u.m location = EarthLocation.from_geodetic(longitude, latitude, elevation) subaru = Observer(name='Subaru Telescope', location=location, timezone=timezone('US/Hawaii'), description="Subaru Telescope on Maunakea, Hawaii") coordinates = SkyCoord('19h50m47.6s', '+08d52m12.0s', frame='icrs') altair = FixedTarget(name='Altair', coord=coordinates) coordinates = SkyCoord('18h36m56.5s', '+38d47m06.6s', frame='icrs') vega = FixedTarget(name='Vega', coord=coordinates) coordinates = SkyCoord('20h41m25.9s', '+45d16m49.3s', frame='icrs') deneb = FixedTarget(name='Deneb', coord=coordinates) start = Time('2015-06-16 06:28:40.126') end = Time('2015-06-16 15:47:35.822') time_window = start + (end - start) * np.linspace(0, 1, 10) altair_style = {'color': 'r'} deneb_style = {'color': 'g'} plot_sky(altair, subaru, time_window, style_kwargs=altair_style) plot_sky(vega, subaru, time_window) plot_sky(deneb, subaru, time_window, style_kwargs=deneb_style) plt.legend(loc='center left', bbox_to_anchor=(1.25, 0.5)) plt.tight_layout() plt.show()