search for: scale_to_rang

Displaying 1 result from an estimated 1 matches for "scale_to_rang".

Did you mean: scale_to_range
2009 May 13
2
plotting multiple data sources
...h. First what I currently do is after i generated all the data I need to plot.. let say 5-6 arrays I do a plot() and then I created a function to scale the other data to approx fit the initial range so it can fit plotted data and then draw it with lines(). Here is the example function I use. Blah.scale_to_range = function(self,data,range_low=0,range_high, skip_cond=(data > 0) ) { ratio <- (range_high - range_low) / (max(data) - min(data)) ((data - min(data)) * ratio) + (range_high - range_low)/2 } so far so good.. the problem I have is that I want the x axis to be Date range. I can plot( x$dat...