Gnuplot

Terminal type set to 'wxt' : 图片输出格式
加、减、乘、除、乘方 : + 、- 、* 、/ 、**
圆周率: pi
开方: sqrt
plot sin(5*x)
set samples 5000 : 设置采样点,默认为100
replot : 每设置一个参数都需要重新replot
unset key : 取消图例,其中key代表图例
set title "sin(5*x)_函数图像" : 设置图像标题
set xlabel “X” : 设置x坐标轴标签
set ylabel "Y" : 设置y坐标轴标签
set xrange [-2*pi : 2*pi] : 设置横坐标取值范围
set yrange [-2 : 2] : 设置纵坐标取值范围
set xtics pi : 设置横轴主刻度
set mxtics 2 : 设置横轴分刻度等分数
set ytics -1,0.5,1 : 设置纵轴刻度(最小主刻度、主刻度步长:最大主刻度)
plot "datafile.dat" with lines : 获得数据连线
plot "datafile.dat" with linespoint : 获得散点和数据连线
linestyle 连线风格(包括linetype、linewidth等)
linestype
linewidth
linecolor
pointtype
pointsize
test : 输出一个测试图
plot "data.dat" with linespoints linescolor 3 lineswidth 2 pointtype 7 pointsize 2
plot "data.dat" w lp lc 3 lw 2 pt 7 ps 2
多组数据绘图
plot "datafile.dat" using 1:2 w lp pt 5 , "datafile.dat" using 1:3 w lp pt 7
using: 使用指定列的数据
plot "datafile.dat" u 1:2 w lp pt 5 title "beijing" , "datafile.dat" u 1:3 w lp pt 7 title "shanghai"
set ylabel "降雨量(英寸)"
plot "datafile.dat" u 1:($2/25.4) w lp pt 5 title "beijing" , "datafile.dat" u 1:($3/25.4) w lp pt 7 title "shanghai"
输出eps图片
set terminal postscript eps
set output "precitation.eps" : 设置输出文件名
plot .....
set output :关闭输出
(unset output)
set term wxt
set terminal postscript eps color solid linewidth 2 "Helvertica" 20 : 彩色图,不要虚线,参数指定2倍带宽,使用Helvetica 20号字体
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值