Reputation: 29
I want to draw plot in gnuplot. I know we can control format using set format x "10^{%L}"
but how can I control them irrespective of data?
On X-axis, I want to have tics at 10^0, 10^1, 10^2, 10^3, 10^4, 10^5, 10^6, 10^7 along with minor tics.
My plot data is :
1 947776
2 16875
3 3280
4 1182
5 534
6 369
7 203
8 178
9 104
10 91
11 78
12 64
13 52
14 51
15 33
16 53
17 31
18 27
19 23
20 26
21 14
22 22
23 16
24 11
25 14
26 18
27 11
28 3
29 4
30 3
31 5
32 5
33 5
34 5
35 3
36 6
37 1
38 5
39 1
40 3
41 1
44 3
45 3
46 4
47 2
48 4
49 1
50 2
51 2
52 1
53 2
54 2
55 1
56 1
59 1
60 2
61 1
64 1
67 1
69 2
70 1
72 1
81 3
89 1
106 1
110 1
114 1
3828682 1
Upvotes: 1
Views: 2821
Reputation: 252
If you want to have a special tic set by yourself, you can make use of set xtics add ("name" value)
as well (see Xtics
in documentation, p.175 f.)
Upvotes: 0
Reputation: 48390
Looking at your data, I would use a double logscale plot. Using set xrange
fixes the xrange independent of your actual data range
set logscale
set format "10^{%L}"
set termoption enhanced
set xrange [1:1e7]
plot 'data.dat'
The result is (with 4.6.5):
Upvotes: 3