# Parametric plot using listplot? [closed]

I was searching in the list of questions here but I couldt find it. I have two vectors say x={0.1, 0.2, 0.3, 0.4, 0.5} and y={2, 3.5, 6, 7, 8}. I want to plot them with respect to each other using probably listplot or listlineplot. What is the easiest way of doing this?

thank you!

-

## closed as off-topic by Kuba, ciao, bobthechemist, Michael E2, RunnyKineMay 27 '14 at 0:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Kuba, ciao, bobthechemist, Michael E2, RunnyKine
If this question can be reworded to fit the rules in the help center, please edit the question.

what do you mean by "to plot them with respect to each other"? –  belisarius May 26 '14 at 17:17
@belisarius Probably Transpose. –  Kuba May 26 '14 at 17:18
@belisarius they are x axis and y axis values. For example $(x_1,y_1)=(0.1,2)$ is the first point. –  Seyhmus Güngören May 26 '14 at 17:33
@SeyhmusGüngören - Transpose[{x, y}] // ListPlot is all you need to do - gives the same result like the answer but is simpler. –  eldo May 26 '14 at 17:54
@SeyhmusGüngören - ListPlot[Transpose[{x, y}],Joined->True,GridLimes->Automatic, ... ] –  eldo May 26 '14 at 18:15

If I'm correct in understanding that you want a standard y versus x plot this will give the desired result:

ListPlot[Partition[Riffle[x, y], 2]]

-

As said in the comments and shown in the answer, there are at least two strategies to apply:

Riffle[{e1,e2,…},{x1,x2,…}] gives {e1,x1,e2,x2,...}

Transpose[{{a, b, c}, {x, y, z}}] gives {{a, x}, {b, y}, {c, z}}


with

x = {0.1, 0.2, 0.3, 0.4, 0.5};
y = {2, 3.5, 6, 7, 8};


you can use:

ListPlot[Partition[Riffle[x, y], 2],
AxesOrigin -> {0, 0},
PlotMarkers -> Automatic, Frame -> True, GridLines -> Automatic,
FrameLabel -> {"Text", "Text"},
PlotLegends -> Placed[{"Values"}, Bottom],
PlotStyle -> Directive[PointSize[Medium], Red]]


ListLinePlot[Transpose@{x, y}, AxesOrigin -> {0, 0},
PlotMarkers -> Automatic, Frame -> True, GridLines -> Automatic,
FrameLabel -> {"Text", "Text"},
PlotLegends -> Placed[{"Values"}, Bottom],
PlotStyle -> Directive[PointSize[Medium], Blue]]


Nota Bene: [Riffle[y, x] or Transpose@{y, x} works as well, if you find some sense in it.

-
Thank you very much for the answer. It is definitely nicer than the first answer. I hope you will appreciate that I accept the first correct answer.(+) –  Seyhmus Güngören May 26 '14 at 20:38
Yeah. Way better than my answer. Well done. –  abrentonc May 27 '14 at 2:13