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
相关推荐
安冬的码畜日常37 分钟前
【AI 加持下的 Python 编程实战 2_10】DIY 拓展:从扫雷小游戏开发再探问题分解与 AI 代码调试能力(中)
开发语言·前端·人工智能·ai·扫雷游戏·ai辅助编程·辅助编程
朝阳5811 小时前
Rust项目GPG签名配置指南
开发语言·后端·rust
朝阳5811 小时前
Rust实现高性能目录扫描工具ll的技术解析
开发语言·后端·rust
程高兴1 小时前
基于Matlab的车牌识别系统
开发语言·matlab
牛马baby1 小时前
Java高频面试之并发编程-07
java·开发语言·面试
CodeWithMe2 小时前
【C++】STL之deque
开发语言·c++
炯哈哈2 小时前
【上位机——MFC】运行时类信息机制
开发语言·c++·mfc·上位机
T.Ree.4 小时前
【数据结构】_树和二叉树
c语言·开发语言·数据结构
夜夜敲码4 小时前
C语言教程(十五):C 语言函数指针与回调函数详解
c语言·开发语言
Cao1234567893214 小时前
判断是否为闰年(C语言)
c语言·开发语言