DataRange
- To: mathgroup at smc.vnet.net
- Subject: [mg83491] DataRange
- From: thomas <thomas.muench at gmail.com>
- Date: Wed, 21 Nov 2007 03:02:29 -0500 (EST)
Hello Mathgroup, I use ListLinePlot to plot some data that has been downsampled. In order to get the original time-range of the data represented correctly on the x-axis, I use DataRange->{1,Length-of-original-data}, which works just beautifully. Now imagine I want to plot 2 sets of data with different original length, both have been downsampled. As far as I know, I cannot use the DataRange option anymore, because it will equally apply to both curves, therefore either stretching or compressing one curve relative to the other. Example: data1 = Range[5];(*imagine original length is 50*) data2 = .5 Range[10];(*imagine original length is 100*) ListLinePlot[{data1, data2}, Frame -> True, AspectRatio -> Full, PlotLabel -> "Correct relative scale of data"] ListLinePlot[{data1, data2}, DataRange -> {1, 50}, Frame -> True, AspectRatio -> Full, PlotLabel -> "data2 is compressed"] ListLinePlot[{data1, data2}, DataRange -> {1, 100}, Frame -> True, AspectRatio -> Full, PlotLabel -> "data1 is streched"] Is there an easy way to do this, short of creating specific {x,y}- pairs for each data point in each of the curves? As a suggestion to WRI I would propose that one should be able to give multiple inputs to DataRange, to handle these issues, similar to way the option PlotStyle->...handles the directives given to it. thomas