1

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?

physicist
  • 101
  • 1
  • 1
  • 8

1 Answers1

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

Mathematica graphics

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

Mathematica graphics

Nasser
  • 143,286
  • 11
  • 154
  • 359