惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 盈盈的工作小纸条

如何清除svn的账号缓存信息(solaris) EMMA 覆盖率工具 强大的ldd 如何对字典中的元素进行排序 在solaris上安装iperf Robotium 数据驱动测试框架 (原创)学习NotesList(Robotium自带的例子) (原创)初试Robotium (原创)LoadRunner 中 调用dll Apache+Mysql+PHP 套件 [转]国外人气最旺的软件测试网站 P6Spy & Irontrack SQL 简单使用 sysbench介绍 Sysbench 安装 代码覆盖率测试 批量修改文件内容 SMTP协议简介 shell 命令 perl:日期转换(date->unixtime) - 盈盈的工作小纸条 - 博客园
Gnuplot--linux下的画图工具 - 盈盈的工作小纸条 - 博客园
盈盈的工作小纸条 · 2008-02-29 · via 博客园 - 盈盈的工作小纸条

Gnuplot 是一种免费的绘图工具,可以移植到各种主流平台。它可以下列两种模式之一进行操作:当需要调整和修饰图表使其正常显示时,通过在 gnuplot 提示符中发出命令,可以在交互模式下操作该工具。或者,gnuplot 可以从文件中读取命令,以批处理模式生成图表。
在shell中敲打"gnuplot", 进入到gnuplot编辑环境里
初级基础命令:
1. set terminal  postscript
设置终端
2. set xlabel 'x-date'
x坐标轴的名字为"x-date"
3. set title "demo"
该图的名字为"demo"
4. set key top left
    set key box
设置图例的位置和形状
5. set output '/test/aa.ps'
设置图片保存到的文件目录
6. set xdata time
set timefmt "%H:%M:%S"
set format x "%H:%M:%S"
设置x坐标轴数据的格式
7.plot ["17:39:31":"17:50:48"] '/var/log/dns.log' using 1:2 title "test" with lines linetype 1
画图, x坐标起点是"17:39:31", 终点是"17:50:48", 源文件为'/var/log/dns.log' , 使用该文件的第一列和第二列数据作图,画直线图

8. 例子:

set xlabel 'x-time'
set ylabel 'y-%'
set mxtics 1
set title "cpu data analysis"
set key top left
set key box
set term post eps color solid enh
set output '/export/home/nancy/cpu.eps'
set xdata time
set timefmt "%H:%M:%S"
set format x "%H:%M:%S"
 plot  ["17:39:31":"17:50:48"] '/export/home/nancy/cpu' using 1:2 title "usr" with line
s linecolor rgb "yellow", '/export/home/nancy/cpu' using 1:3 title "sys" with line linecolor r
gb "red" , '/export/home/nancy/cpu' using 1:4 title "w" with line linecolor rgb "blue", '/expo
rt/home/nancy/cpu' using 1:5 title "idle" with line linecolor rgb "green"

9. 写成脚本直接运行
把8中的命令写到*.plt文件里, 可以gnuplot>load ‘a.plt’, 若只想生成ps或eps文件, 则可以直接在shell下运行gnuplot a.plt

10. ps和eps
ps:生成pft文件
eps:可以直接插入到word/execel 文件中.

11. 目前还有个小问题没有解决---已解决,更新例子(8)
当我在一个图中画多条线时, 如何使用不同的颜色来加以区分

12. 有用的文章

http://www.ibm.com/developerworks/cn/linux/l-gnuplot/index.html
http://cycloid.blog.163.com/blog/static/8847862006823102056295/

http://dsec.pku.edu.cn/dsectest/dsec_cn/gnuplot/ (gnuplot 中文手册)