GNUPLOT 画图实例
1,XRD图
set term pngcairo size 800,800 #设置终端和图片输出格式
set output "XRD-all.png" #设置输出图片名称
set encoding utf8 #设置编码
unset key
set xlabel "2theta" font "Time-Roman,16" offset 0,-1
set ylabel " Intensity" font "Time-Roman,16" offset -2,0 #设置x y坐标轴标题
set mxtics 10
set mytics 5 # 设置x y坐标轴间隔
set xtics font "Time-Roman,16" #设置x 坐标轴文字格式和大小
set xtics nomirror
set ytics nomirror #去除x y轴的镜像坐标轴
set xtics out # 设置间隔朝外
unset ytics
set xrange [25:60]
set yrange [0:6000] # 设置x y坐标轴的范围
set label "HPSM-HF-2" at 27,450 font "Time-Roman,16"
set label "HPSM-HF-4" at 27,1450 font "Time-Roman,16"
set label "HPSM-HF-8" at 27,2450 font "Time-Roman,16"
set label "CSM-HF-2" at 27,3450 font "Time-Roman,16"
set label "CSM-HF-4" at 27,4450 font "Time-Roman,16"
set label "CSM-HF-8" at 27,5450 font "Time-Roman,16"
set label "(101)" at 25,5820 font "Time-Roman,16"
set label "(004)" at 38,5500 font "Time-Roman,16"
set label "(200)" at 48,5730 font "Time-Roman,16"
set label "(005)" at 55,5500 font "Time-Roman,16" #设置相关文字项的字体大小和格式
plot "1.2ml-y.txt" using 1:($2*3+100) with lines lw 3 title "HPSM-HF-2",\
"2.4ml-y.txt" using 1:($2*3+1100) with lines lw 3 title "HPSM-HF-4",\
"4.8ml-y.txt" using 1:($2*3 +2100)with lines lw 3 title "HPSM-HF-8",\
"1.2ml-p.txt" using 1:($2+3100) with lines lw 3 title "CSM-HF-2",\
"2.4ml-p.txt" using 1:($2+4100) with lines lw 3 title "CSM-HF-4",\
"4.8ml-p.txt" using 1:($2 +5100)with lines lw 3 title "CSM-HF-8" # 画图
set out put