# Ploting a list of coordinates in different plots

I have that list of points with 4 coordinates.

sols = {{x1 -> -0.1465958058813781, y1 -> -0.6972834336845714,
x2 -> -0.6972834336845712, y2 -> -0.14659580588137808}, {x1 -> 0.6972834336845714,
y1 -> -0.14659580588137813, x2 -> 0.14659580588137816,
y2 -> -0.6972834336845712}, {x1 -> 0.14659580588137816,
y1 -> 0.6972834336845714, x2 -> 0.6972834336845712,
y2 -> 0.14659580588137808}}


I would like to plot the dots, with the coordinates $x_1 , y_1$ in one plot, and $x_2,y_2$ in another plot. How can I do it ?

ListPlot[List /@ #, Frame -> True, Axes -> False,
BaseStyle -> PointSize[Large], ImageSize -> 300] & /@
Transpose[{{x1, y1}, {x2, y2}} /. sols] sols1 = {x1, y1} /. sols;
sols2 = {x2, y2} /. sols;

ListPlot[sols1]
ListPlot[sols2]


or a one line solution for fun:

ListPlot /@ (sols[[;; , #, 2]] & /@ {{1, 2}, {3, 4}})


EDIT: To plot each point of a different colour and match the colours of the two plots, here's the fastest solution:

sols1 = {{x1, y1}} /. sols;
sols2 = {{x2, y2}} /. sols;

ListPlot[sols1]
ListPlot[sols2]


If you want to choose a color scheme for your points (e.g. AvocadoColours), see code below:

colours = ColorData["AvocadoColors"][] /@ Range[0, 1, 1/(Length@sols1 - 1)]

ListPlot[sols1, PlotStyle -> colours]
ListPlot[sols2, PlotStyle -> colours]

• Thx ! Is there a way to plot each point with a different color, so that it is easy to connect each $x_1,y_1$ to its $x_2,y_2$ ? – J.A Jul 3 '18 at 14:46
• Sure, see the edit to my answer. – Fraccalo Jul 3 '18 at 14:50