gnuplot一张图上画多幅子图,并输出为eps文件

时间:2022-09-30 06:38:27
set term post
set output "fig1.eps"
set size 1, 1
set multiplot layout 2, 2
set size 0.5, 0.5

set origin 0, 0
set title "plot with x^2+y^2"
set palette defined (0 "gray100",20 "gray80",40 "gray60",60 "gray40",\
    80 "gray20",100 "gray0",101 "grey0")
plot "heatmap1.dat" using 1:2:3 with image

set origin 0.5, 0
set title "plot with 2x^2+y^2"
plot "heatmap2.dat" using 1:2:3 with image 

set origin 0,0.5
set title "plot with x^2+y^2"
plot "heatmap1.dat" using 1:2:3 with image

set origin 0.5,0.5
set title "plot with 2x^2+y^2"
plot "heatmap2.dat" using 1:2:3 with image 

unset multiplot

set output

效果如图:

gnuplot一张图上画多幅子图,并输出为eps文件