Gnuplot 学习

目录

Why gnuplot?

gnuplot helps a lot when we want to produce a pdf file about some graphs or figures.
支持二维和三维图形。它的功能是把数据资料和数学函数转换为容易观察的平面或立体的图形,它有两种工作方式,交互式方式和批处理方式。

install

apt-get install gunplot

How to learn?

with the file following:

gnuplot_4.6中文手册_修订2

Example

Plot

gnuplot> plot sin(x) w l lt 3 lw 2
gnuplot> plot sin(x) w p pt 3 ps 2
gnuplot> plot sin(x) title 'f(x)' w lp pt 3 ps 2 lt 3 lw 2
gnuplot> plot ‘a.dat’ u 2:3  w l lt 3 lw 2 %利用数据文件a.dat中的第二和第三列作图

同时画线

gnuplot> plot sin(x) title ‘sin(x)’ w l lt 1 lw 2, \
cos(x) title ‘cos(x)’  w l lt 2 lw 2  
%两条曲线是用逗号隔开的。画多条曲线时,各曲线间均用逗号隔开就可以了

位置控制

gnuplot> set key left  %放在左边,有left 和right两个选项
gnuplot> set key bottom  %放在下边,只有这一个选项;默认在上边
gnuplot> set key outside  %放在外边,但只能在右面的外边
以上三个选项可以进行组合。如:
gnuplot> set key left bottom  %表示左下边
还可以直接用坐标精确表示图例的位置,如
gnuplot> set key 0.5,0.6  %将图例放在0.5,0.6的位置处

Reference

[1]http://linux.chinaunix.net/techdoc/develop/2009/07/21/1125242.shtml

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值