I have an automated script that generates a graph every day using GNUPlot. The amount of data used for the graph grows every day, so my x-ticks get cluttered after a while. Can I somehow limit the number of major x-ticks so that I always see 5, no matter how many points are plotted?
Edit: My comment wasn’t clear enough. This is the way I do it at the moment:
I have a variable var that contains a duration, more exactly the number of seconds in 9 days:
var = 9*86400
And I use set xtics <start>, <incr> to tell GNUPlot to only show a tick for every 9 days of data:
set xtics “20111101”, var
The problem is I have to manually change this every once in a while, since the amount of data grows. Could I somehow tell GNUPlot to limit the number of xticks? Or could I somehow change the variable var to include number of plotted points? (couldn’t find out how to do this, either)
Something like this perhaps. I am assuming you are feeding the input data to this script, and that the number of lines of data decides how many x ticks you will need.
(Sorry, my Gnuplot skills are obviously not very good any more.)