dotplan

troubleshooting & performance analysis

Changing the implicit x axis in time-series plots.

Tags:

Quite often I’ll be plotting out values from some kernel counter or other, that has been collected over time. Typically what we want to then do is to plot that counters’ value over time.

In such a case, I typically have a plot command that looks like this

gnuplot>  plot "somefile.out" using 3 with lines

Gnuplot will then autogenerate an x coordinate for me, and the value will start at 1 and increase with each line that is plot.

Let’s pretend that each statistic is collected at a 3 hour interval over many days, and I want to present the chart with days as the metric.

I can do that using the $0 value, which in this case is the implicit x coordinate. I can do something like this.

gnuplot> plot "somefile.out using (($0*3)/24):3 with lines

Tags:

Leave a Reply

*

© 2009 dotplan. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.