I have a data file which contains three columns of data. The first and the second column correspond to $x$ coordinates, while the third column to $y$ coordinate. Here is a small sample of the data file:
data = {{0.5, -77.06771909999159, 0.0012271846271586164},
{1.0, 0.9928749927334053, 0.019634954034537862},
{1.5, 78.49520253892854, 0.09940195479984795},
{2.0, 173.19305308215831, 0.3141592645526058},
{2.5, 289.4742561958002, 0.7669903919741358},
{3.0, 428.890904029252, 1.5904312767975672},
{3.5, 592.1255900024181, 2.9464702898078396}}
For the first plot we use
S01 = ListPlot[Flatten[List /@ data[[All, {1, 3}]], 1],
Joined -> False, PlotStyle -> {PointSize[0.01], Black},
Axes -> False, Frame -> True, FrameLabel -> {"x1", "M"},
RotateLabel -> False, ImageSize -> 550]
which gives
and for the second plot
S02 = ListPlot[Flatten[List /@ data[[All, {2, 3}]], 1],
Joined -> False, PlotStyle -> {PointSize[0.01], Black},
Axes -> False, Frame -> True, FrameLabel -> {"x2", "M"},
RotateLabel -> False, ImageSize -> 550]
Now, I want to combine these two plots keeping the same $y$ axis as it is, set the first $x$ axis (and of course the corresponding labels and tick marks) at the bottom of the frame and the second $x$ axis at the top of the frame. Is this doable? If so, any suggestions?
Many thanks in advance!
Flatten[List /@ data[[All, {1, 3}]], 1]
rather than justdata[[All, {1, 3}]]
? $\endgroup${}
. $\endgroup$