(pyqtgraph vers 0.13.1)
I have an application that generates a spectrogram. I use scipys spectrogram method, and generate the plot with...
my_plotitem = pg.PlotItem()
f, t, Sxx = scipy.signal.spectrogram( data, Fs=fs)
my_transform = QtGui.QTransform()
yscale = f[-1]/Sxx.shape[1]
xscale = t[-1]/Sxx.shape[0]
my_transform.scale(xscale, yscale)
my_image = pg.ImageItem()
my_image.setTransform(my_transform)
my_image.setImage(Sxx)
my_plotitem.addItem(my_image)
my_plotitem.setLogMode(x=False, y=True)
This works great, but I would like to have the y-axis (the frequencies) to be a log scale. I tried using the plotitems setLogMode method... but it just changes the tick labels (incorrectly) and doesn't change the plot at all. the image on the left is with a linear y-axis, the one on the right is after setting same image to setLogMode(x=False, y=True). Note that the correct range for the y-axis is 0 to 50.
I've searched around and can't find anything. What is the correct way to do this?
J