Here is a sandbox (http://jsfiddle.net/qeyqe/).
Here is a beautiful picture of what I expect saying «stretch the graph vertically».
So, I have an array of dots for my graph and a canvas with 100 px height. The maximum and the minimum values of my graph are 84 (0.8425) and 44 (0.439) respectively — so, graph's height range is 40 px (84 - 44). But I need to stretch this graph so it take the whole 100 px height range — I need to transform value «84» to 100 and value «44» to 0; other intermediate values needs to be also transformed (stretched) to fit new 0-100 px range, not old 0-40 px (see picture above).
So, the main question is not how to «scale» the graph, but how to «stretch» it vertically.