FrequencySeries plots fail
Created by: andrew-lundgren
Plots of ASDs which worked in previous versions of gwpy now fail with a long error message. It seems to be a problem with zero values breaking the auto-scaling of the axes. The plotting function loglog, on which the plot is presumably based, does not have the same issue.
Example code:
from gwpy.timeseries import TimeSeries
data=TimeSeries.fetch('L1:GDS-CALIB_STRAIN',1174445490,1174445494)
data.asd(2,1).plot().show()
The resulting error is FSplot_err.txt
Either of the following work
myasd=data.asd(2,1)
# Remove zero frequency bin
myasd[1:].plot().show()
# Use loglog directly
import matplotlib.pyplot as plt
plt.loglog(myasd.frequencies, myasd)
plt.show()