Reputation: 9110
Below is my gnuplot
code.
set term pdf enhanced
set output "plot/test.pdf"
set datafile separator ","
set xtics norangelimit
set ytics nomirror
set termoption dashed
set xlabel "times"
set yrange [0:100]
set xtics nomirror
set grid ytics
set key right bottom
plot 'plot/test.csv' using 2:xtic((int($0)%20)==0?sprintf("%d", $0*10):"") title "Comparing with the original" with lines lw 2 lc rgb "#DC143C"
And in the data file, I have 100 data. So basically the output figure is something like below:
As I have 100 data, so in the above picture, a very frequent "bar" is shown above the x-axis. So my question is, how to eliminate the "small bars" on the x-axis in the picture above?
Upvotes: 1
Views: 45
Reputation: 48390
You are using the wrong way to set the xtics. There is no need to use xtic()
for this. Just use set xtics
for this:
set xtics 200
plot 'plot/test.csv' using ($0*10):2
Upvotes: 1