Skip to content Skip to sidebar Skip to footer

Change Y Log Scale Imshow()

I'm trying to plot spectrogram with y-scale depending on the period, so I want to have a reversed log-scale. The thing is: I found how to do it using pcolormesh(), not by using im

Solution 1:

Is this what you are trying to get?

axes[1].set_yscale('log')
im2 = axes[1].imshow(data, extent=extent, origin='lower', interpolation='None', cmap='viridis')
axes[1].invert_yaxis()

enter image description here

Post a Comment for "Change Y Log Scale Imshow()"