# 设置终端为png格式,输出文件名为"plot.png" set terminal png size 800,600 set output "plot.png" # 设置数据文件的格式,指定分隔符为逗号 set datafile separator "," set key outside # 设置子图布局为2行1列 set multiplot layout 2,1 # 第一幅子图 set xlabel "angle (deg)" set ylabel "gravity (mGal)" set xrange [10:-10] set key top left inside plot "data/shell2d/shell2d_model_out.csv" using 2:3 with lines title "Vx", \ "data/shell2d/shell2d_model_out.csv" using 2:4 with lines title "Vz" # 第二幅子图 set xlabel "angle (deg)" set ylabel "gradient (Eo)" set xrange [10:-10] set key top left inside plot "data/shell2d/shell2d_model_out.csv" using 2:5 with lines title "Vxx", \ "data/shell2d/shell2d_model_out.csv" using 2:6 with lines title "Vxz", \ "data/shell2d/shell2d_model_out.csv" using 2:7 with lines title "Vzx", \ "data/shell2d/shell2d_model_out.csv" using 2:8 with lines title "Vzz" # 结束多图模式 unset multiplot