Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions astroplan/plots/time_dependent.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ def plot_airmass(targets, observer, time, ax=None, style_kwargs=None,
target_name = ''

# Plot data (against timezone-offset time)
ax.plot_date(timetoplot.plot_date, masked_airmass, label=target_name, **style_kwargs)
ax.plot(timetoplot.plot_date, masked_airmass, label=target_name, **style_kwargs)

# Format the time axis
xlo, xhi = (timetoplot[0]), (timetoplot[-1])
ax.xaxis_date()
ax.set_xlim([xlo.plot_date, xhi.plot_date])
date_formatter = dates.DateFormatter('%H:%M')
ax.xaxis.set_major_formatter(date_formatter)
Expand Down Expand Up @@ -397,9 +398,10 @@ def plot_altitude(targets, observer, time, ax=None, style_kwargs=None,
target_name = ''

# Plot data
ax.plot_date(time.plot_date, masked_altitude, label=target_name, **style_kwargs)
ax.plot(time.plot_date, masked_altitude, label=target_name, **style_kwargs)

# Format the time axis
ax.xaxis_date()
ax.set_xlim([time[0].plot_date, time[-1].plot_date])
date_formatter = dates.DateFormatter('%H:%M')
ax.xaxis.set_major_formatter(date_formatter)
Expand Down Expand Up @@ -619,9 +621,10 @@ def plot_parallactic(target, observer, time, ax=None, style_kwargs=None,
style_kwargs.setdefault('label', target_name)

# Plot data.
ax.plot_date(time.plot_date, p_angle, **style_kwargs)
ax.plot(time.plot_date, p_angle, **style_kwargs)

# Format the time axis
ax.xaxis_date()
date_formatter = dates.DateFormatter('%H:%M')
ax.xaxis.set_major_formatter(date_formatter)
plt.setp(ax.get_xticklabels(), rotation=30, ha='right')
Expand Down
Loading