0
$\begingroup$

let's assume this the set of data {{a1,b1,c1},{a2,b2,c2}........{a10,b10,c10}} plot a vs b and a vs c I have tried plotting this using ListLinePlot function but it didn't work

$\endgroup$
2
  • 1
    $\begingroup$ Welcome to the Mathematica Stack Exchange. Please include Mathematica code (not an image) that you have tried. Thanks. $\endgroup$
    – Syed
    Commented Jan 12, 2023 at 9:45
  • $\begingroup$ Welcome to Mathematica SE. To start: 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, since the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) consider accepting the answer, if any, that solves your problem, by clicking checkmark sign, 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bmf
    Commented Jan 12, 2023 at 9:49

3 Answers 3

2
$\begingroup$

Create some data for fun

data = {{1, 2, 3}, {5, 4, 6}, {9, 8, 7}, {3, 4, 7}, {9, 5, 4}};

Using the following we can isolate the elements of the first, second, and third slots. You want to look up in the documentation the Part command

aset = data[[1 ;;, 1]]
bset = data[[1 ;;, 2]]
cset = data[[1 ;;, 3]]

And now you can just plot the subset against each other

GraphicsRow@{ListPlot[Thread@{aset, bset}], 
  ListPlot[Thread@{aset, cset}]}

row

$\endgroup$
2
$\begingroup$

{{a1,b1,c1},{a2,b2,c2}........{a10,b10,c10}} plot a vs b and a vs c

so take {{an, bn}} and {{an, cn}} out.

I have tried plotting this using ListLinePlot

data = {{1, 2, 3}, {5, 4, 6}, {9, 8, 7}, {3, 4, 7}, {9, 5, 4}};
p1= data[[All,{1,2}]] // ListLinePlot;
p2= data[[All,{1,3}]] // ListLinePlot;
Show[p1, p2]

enter image description here

$\endgroup$
0
$\begingroup$

An overlaid variant of bmf's solution

data = {{1, 2, 3}, {5, 4, 6}, {9, 8, 7}, {3, 4, 7}, {9, 5, 4}};

points = data /. {a_, b_, c_} :> {{a, b}, {a, c}};

text = points /. {a_, b_} :> {Text[a, a], Text[b, b]};

Show[
 Graphics[{Arrow /@ points, text}],
 Axes -> True,
 AxesOrigin -> {0, 0}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.