Maybe example 4.8 from https://docs.obspy.org/tutorial/code_snippets/waveform_plotting_tutorial.html is useful?
import matplotlib.pyplot as plt
from obspy import read
st = read()
tr = st[0]
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.plot(tr.times(“matplotlib”), tr.data, “b-”)
ax.xaxis_date()
fig.autofmt_xdate()
plt.show()