0

I have a file with values

2   2
3   21
4   583
5   197
6   83
7   179
8   246
9   220
10  393
11  295
12  339
13  250
14  223
15  194
16  895
17  201
18  1097
19  371
20  706
21  76
22  180
23  236
24  238
25  101
26  101
27  79
28  116
29  70
30  112
31  54
32  4849
33  53
34  53
35  50
36  32
37  53
38  67
39  35
40  126

and so on. I want to plot these points into a 2D graph.

3
  • 4
    OK, and what part is giving you trouble? I see you tagged with gnuplot, so should we assume you want to use that tool? What do you have so far? If you don't share what you've done with us, we'll just waste your time telling you things you've already tried. So please edit your question and explain what you have so far and what you need help with. Commented Nov 27, 2017 at 11:44
  • the data is generated using a tool. It gives output in this format. I tried using the tool 'plot. Says these is an undefined symbol in the file. Commented Nov 27, 2017 at 12:08
  • 1
    Well, that's precisely the sort of information that should be in the question. Please edit your question and i) tell us what tool you used; ii) show how you imported the data into gnuplot; iii) show us the exact error message you got. We can't help you fix a problem if you don't tell us what the problem is. Could the data be coming from a Windows program? Commented Nov 27, 2017 at 12:50

1 Answer 1

2

The simplest way to do this is to paste numbers into a file using an editor e.g.

  $ vi mynumbers.dat

and then start gnuplot and make a scatter plot

 $ gnuplot
 gnuplot> plot 'mynumbers.dat'

This will produce the following image

enter image description here

It seems like this question must already have an answer somewhere in SE though?

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.