gnuplot使用实例

参考:
gnuplot demos
http://gnuplot.info/screenshots/index.html

一张图急速入门科研绘图 Gnuplot - 知乎
https://zhuanlan.zhihu.com/p/356438078


工作里用到了,记录一下。


实例1

# 在图形种添加箭头,指明起终点、lt是线条的类型,lw是线条宽度
set arrow from 1,1.11 to 22,1.11 nohead lt 4 lw 10
set arrow from 23,1.09 to 40,1.09 nohead lt 1 lw 40
set arrow from 41,1.07 to 46,1.07 nohead lt 3 lw 10
set arrow from 47,1.09 to 69,1.09 nohead lt 1 lw 40
set arrow from 70,1.11 to 78,1.11 nohead lt 4 lw 10
set arrow from 79,1.09 to 98,1.09 nohead lt 1 lw 40
set arrow from 99,1.07 to 225,1.07 nohead lt 3 lw 10
# 图例在图形下方
set key below
# title
set title "TMHMM posterior probabilities for check"
set yrange [0:1.2]
# 图形尺寸,表示绘图区域在 x 轴和 y 轴上的相对当前窗口的大小比例
set size 2., 1.4
#set xlabel "position"
set ylabel "probability"
set xrange [1:225]
# Make the ps plot
# 设置输出格式是postscript eps,字体是Hel* 字号30
# 也可以用 font ",30"
# 前面留空表示使用默认字体
set term postscript eps color solid "Helvetica" 30
# 设置输出的full path
set output "./TMHMM_125850/check.eps"
# 数据文件是check.plp,using指明了使用哪一列(1:4表示以第一列为x坐标,第四列为y坐标)
# title是数据列的标题,with是绘图方式,lt是线条的类型,lw是线条宽度
# 指定线条颜色:linecolor rgb 'red':改成 with impulses lt 1 lw 2 linecolor rgb 'red'
plot "./TMHMM_125850/check.plp" using 1:4 title "transmembrane" with impulses lt 1 lw 2, \
"" using 1:3 title "inside" with line lt 3 lw 2, \
"" using 1:5 title "outside" with line lt 4 lw 2
exit

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值