Python 3.6.2, macOS 10.13.6 High Sierra
conda list
says obspy 0.0.0+archive <pip>
installed probably a year ago
I would like to have the x-axis be in UTC time format, however, I cannot figure out how to convert this from seconds to UTC.
import matplotlib.pyplot as plt
from obspy import read
st = read("sac_file.SAC")
time = st[0].times()
plt.figure(figsize = (22, 10))
plt.subplot(111)
plt.plot(time, st[0], 'k')
plt.ylabel('Counts')
plt.xlabel('Time (seconds)')
plt.show()
Instead, if I use the .plot() method instead of the above code, this formats the x-axis in UTC, but I cannot figure out how to add labels to the axes.