|
From: János L. <jan...@ya...> - 2010-07-02 15:44:28
|
On Jul 1, 2010, at 11:18 AM, János Löbb wrote: > Hi, > > I have data in a format like this /the vertical bar is the field separator/: > > <nyissz> > ... > ... > Oct 13, 2009 09:04:12 | 38 | 1014 | 8274 | > Oct 13, 2009 10:03:58 | 4736 | 122244 | 305682 | > Oct 13, 2009 11:05:08 | 9 | 243 | 2619 | > Oct 13, 2009 12:04:58 | 9 | 243 | 2619 | > Oct 13, 2009 13:04:59 | 4400 | 76199 | 664594 | > Oct 13, 2009 14:05:24 | 30 | 390 | 3966 | > Oct 13, 2009 15:05:32 | 23 | 299 | 3021 | > Oct 13, 2009 16:04:42 | 23 | 299 | 3021 | > Oct 13, 2009 17:03:59 | 1887 | 24247 | 239844 | > Oct 13, 2009 18:03:40 | 1137 | 14533 | 140715 | > Oct 13, 2009 19:03:41 | 1078 | 14010 | 146959 | > Oct 13, 2009 20:03:46 | 1396 | 18052 | 180735 | > Oct 13, 2009 21:04:09 | 611 | 7931 | 84091 | > Oct 13, 2009 22:04:04 | 968 | 12512 | 131243 | > Oct 13, 2009 23:03:30 | 390 | 5039 | 51131 | > Oct 14, 2009 00:04:21 | 1086 | 11970 | 22373 | > Oct 14, 2009 01:04:37 | 2192 | 24160 | 44163 | > Oct 14, 2009 02:04:44 | 1462 | 16098 | 30005 | > Oct 14, 2009 03:04:59 | 1386 | 15266 | 28330 | > Oct 14, 2009 04:04:00 | 818 | 9006 | 17220 | > Oct 14, 2009 05:04:45 | 682 | 7558 | 13971 | > Oct 14, 2009 06:04:49 | 508 | 5704 | 18566 | > Oct 14, 2009 07:04:12 | 797 | 10352 | 107065 | > Oct 14, 2009 08:04:02 | 3049 | 39420 | 388044 | > Oct 14, 2009 09:04:48 | 4481 | 58225 | 586845 | > Oct 14, 2009 10:05:12 | 6 | 78 | 793 | > Oct 14, 2009 11:04:23 | 6 | 78 | 793 | > Oct 14, 2009 12:04:41 | 2308 | 29975 | 310276 | > Oct 14, 2009 13:04:43 | 2279 | 29618 | 306754 | > Oct 14, 2009 14:05:12 | 7 | 91 | 923 | > Oct 14, 2009 15:04:42 | 7 | 91 | 923 | > Oct 14, 2009 16:05:16 | 4 | 52 | 599 | > Oct 14, 2009 17:04:56 | 4 | 52 | 599 | > Oct 14, 2009 18:03:49 | 1217 | 15821 | 167101 | > Oct 14, 2009 19:03:36 | 1095 | 14235 | 150375 | > Oct 14, 2009 20:03:25 | 1349 | 17526 | 181248 | > Oct 14, 2009 21:03:12 | 748 | 9724 | 109797 | > Oct 14, 2009 22:03:13 | 757 | 9841 | 103538 | > Oct 14, 2009 23:03:04 | 371 | 4836 | 50956 | > Oct 15, 2009 00:04:24 | 486 | 6241 | 64914 | > Oct 15, 2009 01:04:34 | 1761 | 22651 | 228304 | > Oct 15, 2009 02:04:56 | 1169 | 15043 | 152581 | > Oct 15, 2009 03:05:06 | 2 | 26 | 260 | > Oct 15, 2009 04:04:16 | 2 | 26 | 260 | > Oct 15, 2009 05:04:28 | 738 | 9352 | 95825 | > Oct 15, 2009 06:04:35 | 515 | 6640 | 70286 | > Oct 15, 2009 07:04:09 | 598 | 7774 | 81384 | > > ... > .. > <nyassz> > > it spans for almost a year like this. I am multi plotting the second, third and forth columns dependencies on the first column. I can also pass data intervals to select just a portion of the data - let say from "Oct 14, 2009 00:04:21" to "Oct 14, 2009 23:03:04". > > I also would like to plot the fourth column dependency on the second or third column, BUT only for the given time interval. I looked the book, but found no direction how to filter the data, if the filtering is not used as one of the axes. > > Any good suggestions ? > > Thanks ahead, > > János In the meantime I found one way to do so. The hint for it is in the book at 34.1.9.1 Using examples and shows how to use the ?: ternary operator to filter data. In the "using 2:3" I replaced the "3" with "(column(1)>$0 && column(1)<$1 ? column(3) : 1/0)" and the meaning of it is: Look if colomn(1) value - the datetime - is bigger than the first passed parameter and if the column(1) value is less than the passed second parameter and if both conditions are satisfied then print the value of the third column of the row, otherwise do nothing. Here is one of the plot commands where I used it: plot [][] "/Volumes/Data/PROJECTS/Sysmon/outs/cachevscpu.out" using 2:(column(1)>$0 && column(1)<$1 ? column(3) : 1/0) title "Raw Data" with points pointtype 7 pointsize 0.4, "" using 2:(column(1)>$0 && column(1)<$1 ? column(3) : 1/0)title "sBezier approximation" smooth sbezier with lines linecolor -1 Thanks, János |