gnuplot绘制文氏图

来源:互联网 发布:市场策划是做什么 知乎 编辑:程序博客网 时间:2024/06/12 03:39

基于前面的几篇博客介绍的技术,现在可以用gnuplot绘制出文氏图。

数据文件

9.5 9 12 Harass8 6 12 Scam5 9 12 AD

plot脚本

set terminal png truecolor nocrop enhanced size 512,280 font "arial,8"set output "abnormal_category.png"set style fill transparent solid 0.5 noborderset xrange [0:20]set yrange [0:15]set label "Harass" at 10,12set label "AD" at 3,10set label "Scam" at 7,2.2set label "AH" at 6.9,11.5set label "AS" at 5.5,6set label "SH" at 9,6.5plot "< awk '{if($4 == \"Harass\") print}' abnormal.data" u 1:2:(sqrt($3)) t "Harass" with circles, \     "< awk '{if($4 == \"Scam\") print}' abnormal.data" u 1:2:(sqrt($3)) t "Scam" with circles, \     "< awk '{if($4 == \"AD\") print}' abnormal.data" u 1:2:(sqrt($3)) t "AD" with circles


图形


0 0
原创粉丝点击