Gnuplot 学习笔记

来源:互联网 发布:值得推荐的淘宝店铺 编辑:程序博客网 时间:2024/06/06 02:28

安装

gnuplotgnuplot-x11(可输出至X11)

帮助

$ gnuplotgnuplot> 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轴labelset 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                          #取消legendset 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    *.epspdflatex    *.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

0 0
原创粉丝点击