# Interpolation with replacing start and end values;

I have a list of data,

data={1.61,37.23,61.83,73.14,79.36,83.88,94.06,96.60,97.73,98.86,99.43,100};

aa=ListPlot[data]


which looks like the following, is there any way that the plot shape remain the same but start from 2 and end at 49 (the x axis remain the same as well 0 to 12, so change in the y axis values from 2 to 49?

I am trying to find a way from interpolation but I am not sure though,

and we can interpolate the function as,

ListInterpolation[data, InterpolationOrder -> 2]


that looks like the following, • Have you tried PlotRange?
– bmf
Mar 7 at 9:08
• PlotRange won't work.
– a019
Mar 7 at 9:43
• I don't understand, really, why you want to change the apparent data values in your plot, but this does what you say you want: ListPlot[Rescale[data, MinMax@data, {2, 49}]] Mar 7 at 16:01

I hope I understand your question correctly. You want to rescale the y data. This can be done with the function "Rescale". We first need to determine the max and min of the original data:

{mi, ma} = MinMax[data]


Then we can rescale the data using "Rescale":

data1 = Rescale[data, {mi, ma}, {2, 49}];
ListPlot[data1] You can choose the domain on the second argument of ListInterpolation:

f = With[{xs = Range[Length[data]]},
ListInterpolation[data, {Rescale[xs, MinMax[xs], {2, 49}]}]];
Plot[f[x], {x, 2, 49}] • I want to change the values of y from y 49 to 2 with same plotshape, not the x range. I think, my question is not clear enoguh. I'll eidt.
– a019
Mar 7 at 9:52