gnuplot使用实例

参考:

gnuplot demos

http://gnuplot.info/screenshots/index.html

一张图急速入门科研绘图 Gnuplot - 知乎

https://zhuanlan.zhihu.com/p/356438078


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


实例1

python 复制代码
# 在图形种添加箭头,指明起终点、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
相关推荐
ITKEY_12 小时前
flutter日期选择国际化支持
开发语言·javascript·flutter
刃神太酷啦13 小时前
C++ 异常处理机制:从基础到实践的全面解析----《Hello C++ Wrold!》(20)--(C/C++)
java·c语言·开发语言·c++·qt·算法·leetcode
q5673152313 小时前
告别低效:构建健壮R爬虫的工程思维
开发语言·爬虫·r语言
枫叶丹413 小时前
【Qt开发】显示类控件(一)-> QLabel
开发语言·qt
Python私教13 小时前
源滚滚Rust全栈班v1.02 无符号整数详解
开发语言·后端·rust
yBmZlQzJ13 小时前
PyQt5 修改标签字体和颜色的程序
开发语言·python·qt
10001hours14 小时前
C语言第12讲
c语言·开发语言
努力的小帅14 小时前
C++_哈希
开发语言·c++·学习·算法·哈希算法·散列表
知彼解己15 小时前
深入理解 AbstractQueuedSynchronizer (AQS):Java 并发的排队管家
java·开发语言
User_芊芊君子16 小时前
【JavaSE】复习总结
java·开发语言·python