Reputation: 429
I have a data file (d.asc) as follows:
0.1 0.5
...
1 0.34
...
10 9.4
...
100 45.3
In between 0.1 and 1, 1 and 10, 10 and 100 I have 35 values. So that in total in d.asc file I have 109 lines. But I just want x-axis to display these four point values (i.e. 0.1, 1, 10, and 100). To plot it I use the following:
set xtics ("0.1" 0.1, "1" 1, "10" 10, "100" 100)
set grid
plot "d.asc" using 1:2 notitle with lines
But this gives something weird, it places 1 and 10 very close to 0.1 (kind of overwrites 1 and 10 on top of 0.1). So that I cannot figure out whether it is 0.1, 1, or 10. And places 100 at the end. But what I would expect to see is 0.1, 1, 10, and 100 on x-axis equally spaced from each other. How can I achieve this? Thanks.
Upvotes: 1
Views: 778
Reputation: 310287
If you want them to be equally spaced from each other, you need to use a logscale
.
set logscale x
Or maybe,
set logscale x 10
Upvotes: 1