Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
equalizes the height of the graphs of any spectra displayed in
setup: function() {
// code to run on startup
// assume the same # of datapoints for now
// (this could be a poor assumption but we could bin them)
// go through each spectrum
// determine highest y-height
var highest = 0
if (highest < v[1]) highest = v[1]
// now resize the spectrum:
// adjust the intensity by dividing it by the highest peak height
$[index].data[i] = [v[0],v[1]/highest]
flotoptions.yaxis.max = null
draw: function() {
// code to run every frame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.