I have two data lists with names data1 and data2. data1 has 8 columns and data2 has two columns. How can I plot 3rd column of data1 verses 1st column of data2?
Asked
Active
Viewed 502 times
1 Answers
3
one way.
data1 = RandomReal[1, {10, 8}];
data2 = RandomReal[1, {10, 2}];
x = data2[[All, 1]];
y = data1[[All, 3]];
(data = Transpose[{x, y}]) // MatrixForm

ListPlot[data, PlotStyle -> Directive[Red, PointSize[Large]],
Frame -> True, FrameLabel -> {{"y(x)", None}, {"x", "my nice plot"}},
GridLines -> Automatic, GridLinesStyle -> LightGray]

Nasser
- 143,286
- 11
- 154
- 359