|
From: Lars H. <la...@ho...> - 2007-01-28 19:54:54
|
Hello world! > Data file contains records like following: > 09 13.62 > 10 27.55 > ..where first column is a hour. > Total count of records is more than 24 (data for many > days). > > How to display data without summarizing records with the > same hour value? Currently, "plot 'datafile' using 1:2" > displays 24 steps only, each summarizes Y-values from > records for Nth hour. Sure it does, since it was designed to plot x/y-datafiles and your datafile only contains x-values from 1 to 24. But there ist hope: You may read more about gnuplots facilities to deal with timeseries. Please see "help format" and "help timefmt". If your datafile is filled completely with values given for _every_ hour, one other way of plotting it would be to use the line number of the datafile as x-value. I would solve your problem by something like this: plot "file" using ($0*24):2 $0 stands for the line number. By this you can use it like every other variable within mathematical expressions, that may be used as one of the arguments of the using-option. > More widely, how to use non-numeric values for X axis (or > implicitly interpret them as non-numeric) > and display Y values with fixed step? > For example, > WakeUp 1.234 # display at X=1 > GotoHome 5.678 # display at X=2 For this there are special values "0", "-1" and "-2" within the using-option, see "help using". If you want to use the special names of the lines given as column one for the names of the xtics, you may use the various features given by the scanf-library in combination with "set xtics". Some of the facilities of scanf are also described in the help-text of using. HTH Lars > ... > > WBR, Ilya |