I am trying to plot some astronomical data in Bokeh. One of my plots is an astronomy spectrum where it is a two-dimensional array where the cell values are the numbers of photons recorded by the telescope. Right now, I can plot the image and see the spectrum in Bokeh using the fig.image command. However, it would be extremely useful to chance the label of one of the axes to show the wavelengths that the pixel columns correspond to, rather than the number of the pixel column.
I’ve been looking at the examples given for categorical plots, but I’m not seeing any examples for the image type of plots. I’m also having some difficulty finding a good tutorial online.
I’ve already tried changing my initialization of the Bokeh plot from:
figPS = bokeh.plotting.Figure (title=‘Spectrum’,x_range=[0, numpy.shape(normed)], y_range=[0, numpy.shape(normed)])
figPS = bokeh.plotting.Figure (title=‘Paint Strip’,x_range=[0, numpy.shape(normed)], y_range=[wavegrid, wavegrid[-1]])
by changing the y_range to the lower and upper limits of my wavelength grid (as the categorial examples online seem to suggest), however this just produces an empty Bokeh plot - it looks like it rather changes the y-axis limits to plot a range outside of my data.
Does anyone know how to tackle this issue?