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
相关推荐
后台开发者Ethan24 分钟前
Python需要了解的一些知识
开发语言·人工智能·python
常利兵1 小时前
Kotlin作用域函数全解:run/with/apply/let/also与this/it的魔法对决
android·开发语言·kotlin
幼稚园的山代王1 小时前
Kotlin-基础语法练习一
android·开发语言·kotlin
重生成为编程大王1 小时前
Java ConcurrentHashMap 深度解析
java·开发语言
tanyongxi662 小时前
C++ 特殊类设计与单例模式解析
java·开发语言·数据结构·c++·算法·单例模式
遗憾皆是温柔2 小时前
24. 什么是不可变对象,好处是什么
java·开发语言·面试·学习方法
wearegogog1232 小时前
C语言中的输入输出函数:构建程序交互的基石
c语言·开发语言·交互
Fine姐2 小时前
The Network Link Layer: 无线传感器中Delay Tolerant Networks – DTNs 延迟容忍网络
开发语言·网络·php·硬件架构
HAPPY酷3 小时前
给纯小白的Python操作 PDF 笔记
开发语言·python·pdf
liulilittle3 小时前
BFS寻路算法解析与实现
开发语言·c++·算法·宽度优先·寻路算法·寻路