I have a series of data [frequency, intensity] measured at different temperatures. I would like to plot this so that the frequency data is on the x axis, the temperature is the y axis, and the colour shows the intensity. Each temperature would then form a horizontal line at the corresponding temperature.
For the sake of a MWI that is similar to my data, we can imagine that a noisy signal is measured at three different temperatures:
import pandas as pd
import numpy as np; np.random.seed(1)
# columns for x and three temperatures
columns=['x','275 K','300 k','325 K']
# linear x
x=np.linspace(-5,5)
# random noise
noise=np.random.randn(3,len(x))
df=pd.DataFrame(np.vstack((x,noise)).T,columns=T)
The aim is to produce something similar to this 1D heatmap, but with several stacked flat lines, preferably with the y-position corresponding to the measured temperature. If this is not practicable, then I can simply add a label indicating the temperature.