【发布时间】:2017-09-28 01:01:45
【问题描述】:
我想绘制以下数据集。
+---------------+-----------+-------------+-----+----+----+--------------------+-------------------+----+----+----+----+--------------------+--------------------+------------------+--------------------+-----------------+------+
| time_stamp_0|sender_ip_1|receiver_ip_2|count|rank| xi| pi| r| ip5| ip4| ip3| ip2| variance| entropy| pre_chi_square| chi_square| total_chi_square|attack|
+---------------+-----------+-------------+-----+----+----+--------------------+-------------------+----+----+----+----+--------------------+--------------------+------------------+--------------------+-----------------+------+
|10:37:37.000985| 10.0.0.3| 10.0.0.1| 9345| 1|1796|1.070090957731407...|0.19218833600856072|1211|1157|4812|1796|6.982982177427692E-5|9.783410080138751E-4|3.3954177346722574|0.001890544395697248|13.58167093868903| 1|
|10:37:37.000995| 10.0.0.3| 10.0.0.1| 9345| 2|1796|2.140181915462814...|0.19218833600856072|1211|1157|4812|1796|3.497253089848578...|0.001808335909968907| 17.00510593066335|0.009468321787674473|13.58167093868903| 1|
|10:37:37.001002| 10.0.0.2| 10.0.0.1| 9345| 3|1796|3.210272873194221...|0.19218833600856072|1211|1157|4812|1796|8.436389877417202E-4| 0.00258233850119472|41.021252923981834|0.022840341271704808|13.58167093868903| 1|
我需要有一个图来显示“time_stamp_0”上的“等级”,仅适用于 sender_ip_1="10.0.0.3"。 我有以下代码:
set timefmt '%H:%M:%S'
set xdata time
set format x '%H:%M:%S'
//I have a problem with the below code
plot "test.txt" using 1:($2=="10.0.0.3"?$5:1/0)
但是绘制的图形不正确。 实际上,似乎对数据没有应用过滤,图和没有过滤的图一样!
我应该提一下,数据框位于文件 (test.txt) 中,并且没有任何标题。
你能帮帮我吗?
【问题讨论】: