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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值