So I'm using gnuplot to plot some data over time, and I want the bottom axis to be time in hours. There should only be 4-5 hour marks on the x axis, but because the data is so spread out gnuplot seems to want to duplicate each point (probably wanting some minutes data to fill the gaps).
So it looks like this on the x axis:
hours: 0 0 1 1 2 2 3 3 4 4
But should look like this:
hours: 0 1 2 3 4
Is there a setting I can flip to tell it to not duplicate the x axis values?
Here is the .plt file's contents (shortened):
clear
print ""
set terminal pngcairo transparent enhanced font "arial,25" - - - fontscale 1.0 size 1920, 1080
set key outside bottom center box title "spiders in my house over time" enhanced
set key maxrows 4
set key font ",25" spacing 1 samplen 2.9 width 2 height 1
set xlabel "Time (hours)" offset -35 font ",30"
set ylabel "% Average number of spiders (100 means house is filled)" font ",30"
set output "spiders.png"
set title "Average spiders in my house" font ",35"
set datafile separator ","
set xdata time
set timefmt "%Y-%m-%d %H:%M:%S"
set xtics format "%H" font ",25"
set ytics font ",25"
set style line 1 lt 1 lc rgb "red" lw 4
show style line
starting_time = 8631
plot "spider_data.csv" using (timecolumn(1)-starting_time):2 every ::3 ls 1 t "SPIDERS AHHH" with lines
Now if I change set xtics format "%H" font ",25"
to `set xtics format "%H:%M" font ",25"' then it stops duplicating, but that doesn't really fix the problem of wanting only hour ticks.
The .csv file has time, val
format.