Spectrogram plot 'rasterized' kwarg doesn't work
Created by: tjma12
This is the script I was trying to run, using a rasterized data set and writing to a pdf:
gps=1134917957
hoft = TimeSeries.get('L1:GDS-CALIB_STRAIN',gps,gps+200,verbose=True)
specgram = hoft.spectrogram2(fftlength=2,overlap=1.75) ** (1/2.)
medratio = specgram.ratio('median')
plot = medratio.plot(norm='log', vmin=0.8, vmax=5,rasterized=True)
plot.set_ylim(30,2048)
plot.set_yscale('log')
plot.add_colorbar(label='Amplitude relative to median',cmap='YlGnBu_r')
plot.savefig('/home/tjmassin/public_html/cbc/DQ/O1/60-200Hz-noise/60-200Hz-noise-200s.png',format='PDF')
This is the error and traceback I was shown:
Traceback (most recent call last):
File "plot_spectrogram.py", line 52, in <module>
plot = medratio.plot(norm='log', vmin=0.8, vmax=5,rasterized=True)
File "/home/detchar/opt/gwpysoft/lib/python2.6/site-packages/gwpy/spectrogram/core.py", line 193, in plot
return SpectrogramPlot(self, **kwargs)
File "/home/detchar/opt/gwpysoft/lib/python2.6/site-packages/gwpy/plotter/spectrogram.py", line 39, in __init__
super(SpectrogramPlot, self).__init__(*args, **kwargs)
File "/home/detchar/opt/gwpysoft/lib/python2.6/site-packages/gwpy/plotter/timeseries.py", line 339, in __init__
super(TimeSeriesPlot, self).__init__(**kwargs)
File "/home/detchar/opt/gwpysoft/lib/python2.6/site-packages/gwpy/plotter/core.py", line 68, in __init__
super(Plot, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'rasterized'