Gnuplot 学习笔记

安装

gnuplotgnuplot-x11(可输出至X11)

帮助

$ gnuplot
gnuplot> help some_command

示例

set term postscript eps enhanced size 3.7,5 #enhanced使用增强文本,size 图的大小(英寸),terminal默认为wxt(X11)
set output "psr.eps"        #输出文件名

#坐标轴
set xlabel "Period (s)"         #x轴label
set logscale x                    #设x轴为对数坐标
set xtics 1e-9,-1000,1e-24   #x轴标度范围
#set xtics (2,4,6,8,10)
set xr [0.001:20]                  #x轴范围
set ydata time                    #设y轴数据为时间
set timefmt "%H:%M:%S"    #设置时间格式
set format y "%g{/Symbol \260}"    #y轴标度格式

#标注
set key 0.01,100                  #legend位置
#unset key                          #取消legend
set arrow from 0.1,2 to 0.2,3  #箭头
set label "peak" at 0.01,10 rotate by 10    #标签

#变量
a=3*2**3  

#作图
plot "a.dat" using 1:2 title 'relation' with points pointtype 6 linetype rgb "red" pointsize 1,\ #数据文件作图
x**2 with line linetype 5    #函数做图

文件转换

eps->pdf(否则直接插入tex中enhance文本会显示异常)

epstopdf    *.eps
pdflatex    *.pdf

运算符

符号示例解释
^a^x上标 \superscript
_a_x下标 \subscript
@a@^b_c上标和下标同时出现 \phantom box (occupies no width)
&&{space}插入指定宽度空白 \inserts space of specified length
~~a{0.8-}将后字符放在前字符的顶部 \overprints '-' on 'a', raised by 0.8 times the current fontsize

特殊符号

symbol

点与线

pointtype & linetype

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值