Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Email

第 29 章 Gnuplot

目录

29.1. 安装 Gnuplot
29.1.1. CentOS 环境
29.1.2. Ubuntu 环境
29.1.3. 测试 Gnuplot 是否可用
29.2. terminal
29.3. output
29.4. title/xlabel/ylabel
29.5. xrange/yrange
29.5.1. 时间轴范围
29.5.2. 日期轴范围
29.6. xdata
29.6.1. Date/Time
29.7. plot
29.7.1. using
29.8. PHPlot
29.9. FAQ
29.9.1. Could not find/open font when opening font "arial", using internal non-scalable font
29.9.2. 变量传递

http://gnuplot.info/

29.1. 安装 Gnuplot

29.1.1. CentOS 环境

# yum install gnuplot
			

29.1.2. Ubuntu 环境

$ sudo apt-get install gnuplot
			

29.1.3. 测试 Gnuplot 是否可用

$ cat test.log
8:00 506.877
8:30 501.068
9:00 493.254
9:30 469.184
10:00 460.161
11:00 426.065
12:00 429.734
14:00 409.255
15:00 423.512
16:00 390.676
17:00 390.676
18:00 390.676

$ cat test.gnuplot
set terminal png truecolor size 800,250
set output "test.png"
set autoscale
set xdata time
set timefmt "%H:%M"
set style data lines
set xlabel "time per day"
set ylabel "Mbps"
set title "Apache Traffic"
set grid
plot "test.log" using 1:2 title "Hit"

$ gnuplot test.gnuplot
			
comments powered by Disqus