To only show tic marks once each day, I do:
set xtics 86400
However, If I try to combine these, it doesn't work: I get the
formatted tic labels, but for every data point. I think because it's
using the ticlabels, not the actual data values, to evaluate the
'xtics <incr>'.
Is there a way to do what I want?
Thanks,
-Brian
I'm not at all sure I understand what you are aiming for, but
experimenting with these commands may help:
# Make the minor (unlabelled) tics longer than default
set xtics scale 1.0, 2.0
# set major tics every 100 days, not overlapping range of data
set xtics 86400*100
# fill in with minor tics every day
set mxtics 100
# Now add to the mix by picking up labeled major tics from the data
plot ... xticlabels(foo($1))
To me it seems you're trying way too hard. gnuplot's internal time/date
handling should be entirely sufficient for what you're trying to do:
set xdata time
set timefmt '%s'
set format '%m/%d/%y %H:%M'
plot 'entropy_avail.dat' using 1:2
> However, If I try to combine these, it doesn't work: I get the
> formatted tic labels, but for every data point. I think because it's
> using the ticlabels, not the actual data values, to evaluate the
> 'xtics <incr>'.
No. It's because xticlabels(<n>) does exactly what you don't want: one
x-axis ticklabel per data record. 'set xtics' has no effect whatsoever
on a plot using the xticlabels(<n>) option.
Thank you very much. You're exactly right, of course, I just didn't
know enough about gnuplot processing of time and date. I came up with
the following:
set xdata time
set timefmt "%s"
set format x "%b %d - %Y"
#Only show labels once per day
set xtics rotate 86400
plot "timeStampedData.dat" using 1:2 notitle with steps
Thanks
-Brian