I am trying to plot two graphs using different columns from the same data file. As the range of one graph is far greater than the other, I am setting the y-axis to a logarithmic scale. As the domain of values are also very small for both graphs, I am also setting the x-axis to a logarithmic scale.
I have no problem plotting the graphs except that gnuplot
does not plot the first points in the data file (where x = 0).
The code that I am using to plot the graphs is thus:
set xrange [1:2500]
set yrange [1:2000]
set log x
set log y
plot "datafile.txt" using 1:2 with lines, "datafile.txt" using 1:3 with lines
Note that, because I am using a logarithmic scale for both axes, I cannot include the value of zero in either range.
An excerpt of the data file that I am using is thus:
Table of Results: Range: {-50...50}
Dim #AvgP #AvgNP
0 0 1743
1 0 564
2 0 914
3 0 1040
4 0 1072
5 0 1005
6 0 815
7 1 689
8 3 525
9 4 433
10 3 350
11 0 255
12 1 216
13 2 140
14 2 84
15 1 57
16 0 38
17 0 16
18 0 15
19 1 7
20 0 2
21 0 1
22 0 1
23 0 0
24 0 0
25 0 0
. . .
. . .
. . .
The file that is plotted is thus:
Notice how the first value of the second graph is not plotted.