Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
hag
Posted - 03/30/2006 : 2:27:44 PM Origin Version (Select Help-->About Origin): 7.5 Operating System:windows xp
how would you normalize a graph? i have 3 graphs and i want all peeks to reach the same point.
1 L A T E S T R E P L I E S (Newest First)
Mike Buess
Posted - 03/30/2006 : 3:07:24 PM Bring up the first graph and run this from the script window...
sum(%C); yPk=sum.max; // save maximum Y value of curve ymin=y1; // save lower Y axis limit ymax=y2; // save upper Y axis limit
Then run this for each remaining graph...
sum(%C); (%C)*=yPk/sum.max; // normalize y1=ymin; // set lower Y axis limit y2=ymax; // set upper Y axis limit
...If you need to do this often you might want to create a button that acts like the Normalize command for worksheets. You can assign the script below to the Custom Routine button as described here.
sum(%C); divider=sum.max; GetNumber -s $WksAnaly.NormalizeCurrent divider $WksAnaly.NormalizeDataset; if (divider==0 || divider==0/0 ) { type -b $General.Normalize; return 1; }; undo %C; %C/divider; del divider;