Skip to content

Instantly share code, notes, and snippets.

Created Jul 30, 2014
What would you like to do?
equalizes the area under the curve of any spectra displayed
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)
var sum = 0
// add the intensity to the sum
sum += v[1]
// adjust the intensity by dividing it by the sum
$[index].data[i] = [v[0],v[1]/sum]
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