我的gnuplot是最新版本5.0
现在的csv文件还是之前博客 org将csv文件转换成table 提到的文件。
现在编写iris.plot文件,里面的gnuplot命令如下:
set terminal png
set output "iris.png"
set title "鸢尾花散点图"
set xlabel 'sepal length'
set ylabel 'petal length'
plot 'iris.csv' using 1:3 "%lf,%lf,%lf"
说明
1. 前面两行表示结果输出为当前目录的iris.png文件
2. plot命令 接收csv文件作为数据文件,使用1和3列(这里列从1开始),1-3列的数据