没有合适的资源?快使用搜索试试~ 我知道了~
首页gnuplot 中文手册 修订2
资源详情
资源评论
资源推荐
第一部分
GnuPlot 4.6
中文手册 当前修订次数:2
版权
Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley
Permission to use, copy, and distribute this software and its
documentation for any purpose with or without fee is hereby granted,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear in
supporting documentation.
Permission to modify the software is granted, but not the right
to distribute the complete modified source code. Modifications are
to be distributed as patches to the released version. Permission to
distribute binaries produced by compiling modified sources is
granted, provided you
1. distribute the corresponding source modifications from the
released version in the form of a patch file along with the
binaries,
2. add special version identification to distinguish your version
in addition to the base release version number,
3. provide your name and address as the primary contact for the
support of your modified version, and
4. retain our contact information in regard to use of the base
software.
Permission to distribute the released version of the source code
along with corresponding source
modifications
in the form of a patch file is granted with same provisions 2
through 4 for binary distributions.
作者
Original Software:
Thomas Williams,
Colin Kelley.
Gnuplot 2.0 additions:
Russell Lang, Dave Kotz, John Campbell.
Gnuplot 3.0 additions:
Gershon Elber and many others.
Gnuplot 4.0 additions:
See list of contributors at head of this document.
译者:三寸断梁
前言
本文档针对 4.6 版手册翻译了全文大约%85 的内容,终端部分从略。本手册是本人空闲时间学习
gnuplot 而翻译,疏漏难免。不保证含义准确,仅供参考。若发现手册中有错误可以报告:
gnuplot_cn_manual@126.com ,邮件主题必须以"gnuplot: " 开始,否则系统不接收,成功后你可以
收到自动回复的邮件。
Gnuplot 是一个小巧的命令行绘图工具,运行于 LINUX ,OS/2,MS Windows,VMS 等等其它平台。
它的源代码开放。它最初被设计为科学家或学生交互式创建函数图像和数据图表。但是现在它也作为一
个绘图引擎用于其它程序,octave 是一个例子。
Gnuplot 支持多种类型的绘图,2D 和 3D。它能利用线段,点,直方图,或者其它元素绘制你需要的
图形。同时你可以在图形中添加一些文本。
Gnuplot 支持多种类型的输出类型:交互式屏幕终端(鼠标、键盘),直接输出多种文件格式
(png,jpg,LaTeX,pdf,postscript)或者现代打印机。Gnuplot 很容易扩展去支持新的输出类型。最新
的支持有基于 wxWidgets 的交互终端,QT。将输出 web 页面可以使用 svg 或者 HTML5 canvas 输出类型。
Gnuplot 是大小写敏感的。所有的命令名和关键字在它无歧义时可以缩写
1
。在命令尾部使用分号可
以让多条命令出现在同一行。字符串可以用双引号或单引号括主,有少许不同。
1 plot "data" using 1:2 with lines; 可以缩写为: plot "data" u 1:2 w l;
如果一条命令太长可以在末尾使用反斜线后在下一行继续(反斜线必须是此行的最后一个字符):
plot sin(x),f2(x),f3(x),\
f4(x),f5(x);
但是如果发生错误,命令解析器无法准确定位到出错的行。在本文中花括号用于表示可选参数,管
道符号用于分割一些可选选项。<>用于表示可认为更改的部分。
Gnuplot 在命令行上使用 gnuplot {OPTIONS} file1 file2. … ; 启动。对于 X11 系统 可以使用:gnuplot
{X11OPTIONS} {OPTIONS} file1 file2 ... 具体查阅 X11 的文档。
命令行中的选项可以出现在行的任何地方,文件名将按顺序依次执行。
- 作为文件名,让 gnuplot 从标准输入读取。
新特性
本节介绍 4.4 版本以来主要的附加功能。详见 NEWS 文件。
新语法
这个版本的 gnuplot 新增了佚代指令,和块结构(if else while do)详见后文。简单的佚代指令可以在 plot
set 命令中使用。例如:
set multiplot layout 2,2
100 term Fourier series
fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x)
do for [power = 0:3] {
TERMS = 10**power
set title sprintf("%g term Fourier series",TERMS)
plot 0.5 + sum [k=1:TERMS] fourier(k,x) notitle
}
nset multiplot
本地化的 linetypes 用户设置
你可以设置默认的 linetype,详见set linetype。这通常在启动文件中设置。
新的 plot styles
查看 plot styles :boxplot,circles,ellipses 的文档。
翻转坐标轴
坐标轴现在可以不使用 x y 命名。详情查看 set polar and set rrange
新的平滑算法
新的算法支持 2d 3d 绘制。smooth kdensity 或者 smooth cumulative 同 plot 指令同时使用。
新的时间和日期处理
Gnuplot 现在使用毫秒(千分之一秒)精度。时间数据必须被格式化成规定格式。内建函数 time()返
回当前系统时间。例如输出时间:
print strftime("%H:%M:%.3S %d-%b-%Y",time(0.0))
18:15:04.253 16-Apr-2011
数据统计汇总
新命令 stats 从文件读取数据,使用 plot 相同的语法。并且输出统计汇总,包括最大值,最小值,众数,
平均值,标准差,关联性。等等。
反向兼容
Gnuplot 4.0 摒弃了旧版本中的部分语法。但是仍然对它们提供了支持。需要在编译时提供支
持:./configure --enable-backwards-compatibility 。
Deprecated:
set title "Old" 0,-1
set data linespoints
plot 1 2 4
# horizontal line at y=1
New:
TITLE = "New"
set title TITLE offset char 0, char -1
set style data linespoints
plot 1 linetype 2 pointtype 4
批量处理和交互操作
Gnuplot 既可以从文件读取命令执行,也可以交互运行。使用-e "command" 将执行一个 gnuplot
命令。
使用-persist 直接从命令行读取程序。退出后窗体后台保留。
gnuplot -persist -e "set title 'Sine curve'; plot sin(x)"
设置变量影响脚本执行。
gnuplot -e "a=2; s='file.png'" input.gpl
画布尺寸
以前版本 gnuplot,对于某些终端类型使用 set size 命令控制画布大小,而其它终端用其它方法。4.2
版本以来 set size 命令被放弃。4.4 版本几乎所有的终端类型使用同样的语法。
set term <terminal type> size <XX>, <YY>
默认情况下,输出将使用整个画布。
set size <XX>,<YY> 缩放 plot 相对于画布的大小。值小于 1 表示 plot 不使用整个画布。值大于 1
表示 plot 的某一部分将会被显示在画布上。在某些终端类型下值大于 1 会出错。
这个规则的主要例外是,PostScript 驱动。
set size 0.8, 0.5
set term png size 400, 400
set output "figure.png"
plot sin(x),x
这些指令用于绘制一个 400*400 大小的 png 图片,绘制区域横向使用 80% 纵向使用 50%(下图蓝
色边框是译者加入的):
剩余196页未读,继续阅读
i龙家小少
- 粉丝: 353
- 资源: 86
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2