views:

357

answers:

2

I'm generating a graph with gnuplot of activity over the last twenty four hours, but the time axis looks really bad because it's trying to fit the long number for every five minutes in the last day.

Is there any way for gnuplot to treat the x-axis as an epoch time, and mark every hour or so?

A: 

Have a look at this link

hope this will help you in dealing with number format on x axis.

Space
So is it not possible to display as a time? The article doesn't talk about that. Interesting to know though
Jeffrey Aylesworth
+1  A: 

Is this what you want?

set xdata time
set timefmt "%s"
# set xtics 3600
set format x "%H:%M:%S" # or whatever
plot ...
Alok
This gives me the error "Need full using spec for x time data"
Jeffrey Aylesworth
Yeah, you will have to plot and use "using", so if you're plotting columns 1 and 2, do: "plot 'file' using 1:2 ... " instead of just "plot 'file' ..."
Alok
Thanks, sorry I missed your comment before!
Jeffrey Aylesworth