# Plotting two lists of different lengths versus each other

I have two data lists and would like to plot them versus each other.

list1 = Get["http://pastebin.com/raw/Y9FFBzV5"];
list2 = Get["http://pastebin.com/raw/UjWXjgEL"];


The problem is they are of different length:

Dimensions[list1]
{4882}

Dimensions[list2]
{1392}


I would like to "stretch" list2 to the same length as list1, so that missing data should be interpolated.

UPDATE:

In the plot the minimum point should be {list1[[1]],list2[[1]]}. The maximum point should be (after data processing of list2): {list1[[4882]],list2[[4882]]}

What do I have to do?

• ListLinePlot[{list1, list2}, DataRange -> {0, 100}], see DataRange Feb 10, 2017 at 15:00
• @lio There are two issues here. Would you like to plot them at the same graph, or one against the other (in this case in what order). The second issue is your "stretching" therm. Do you want to extrapolate missing points (of vector 2) or add points in between existing points and interpolate them. Or in other words, do terminal points of list1 correspond to terminal points of list2 Feb 10, 2017 at 15:02
• @ercegovac: I want not make two curves, the lists shoudl be plotted against each other, list1 as the horizontal axes and list2 as vertical axis.
– lio
Feb 10, 2017 at 15:08
• @lio You did not answer the second part of the question. Interpolation (adding points between existing points) or extrapolation beyond one of the terminal points. Feb 10, 2017 at 15:13
• ListLinePlot[Thread[{list1, ArrayResample[list2, Length@list1]}]] Feb 10, 2017 at 15:14

ListLinePlot[Thread[{list1, ArrayResample[list2, Length@list1]}],