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
$\begingroup$
$\endgroup$
2
-
1$\begingroup$ Welcome to the Mathematica Stack Exchange. Please include Mathematica code (not an image) that you have tried. Thanks. $\endgroup$– SyedCommented 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$– bmfCommented Jan 12, 2023 at 9:49
Add a comment
|
3 Answers
$\begingroup$
$\endgroup$
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}]}
$\begingroup$
$\endgroup$
{{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]
$\begingroup$
$\endgroup$
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}]