gnuplot画图

1、柱状图,y轴以10^x的格式表示

# 以png格式输出
set term pngcairo lw 1 font "/usr/common/fonts/simsun.ttc,14"
# 以pdf格式输出
set term pdfcairo lw 1 font "Times New Roman,16"
set style data histogram
set style histogram clustered gap 1
set style fill solid border 0
set palette gray
unset colorbox
set key left
set key left reverse Left spacing 1.2
set log y 10
set yrange[1:100000]
set format y '10^{%L}'
set output 's1.png'
set ylabel "y轴"
# 从E:\figures\ged\pic.txt加载数据文件
plot 'E:\figures\ged\pic.txt' using 2:xticlabels(1) title columnheader(2) w histograms palette frac 0.9, '' using 3:xticlabels(1) title columnheader(3) w histograms palette frac 0.6
set output

2、折线图

set term pdfcairo lw 1 font "Times New Roman,16"
set style fill solid
set palette gray
unset colorbox
set key left
set key left reverse Left spacing 1.2
set log y 10
set xrange [0:6]
set yrange[1:100000]
set format y '10^{%L}'
set output 'scalability.pdf'
set ylabel "Filtering Time (sec)"
set xlabel "GED threshold τ"
plot 'E:\figures\scalability.txt' using 2:xticlabels(1) title columnheader(2) w linespoints palette frac 0.9, '' using 3:xticlabels(1) title columnheader(3) w linespoints palette frac 0.7, '' using 4:xticlabels(1) title columnheader(4) w linespoints palette frac 0.5
set output
set term pngcairo lw 1 font "C:\Windows\Fonts\simsun.ttc,14"
set palette gray
unset colorbox
set key left
set key left reverse Left spacing 1.2
set xrange [1:6]
set yrange[-10:420]
set ytics 0,60,420
set output 'q1.png'
set ylabel "y 轴"
set xlabel "x 轴"
plot 'E:\figures\q1.txt' u 1:2 w lp lt -1 pt 5 title "y1",'' u 1:3 w lp lt -1 pt 7 title "y2",'' u 1:4 w lp lt -1 pt 9 title "y3"
set output

你可能感兴趣的:(图搜索)