作者ckclark (大资佬)
看板EZsoft
标题Re: [请益] 科学用的绘图软体?(如gnuplot)
时间Mon Feb 18 01:21:21 2008
※ 引述《drlai (苏打)》之铭言:
: 想请问是否有适用於科学绘图的软体呢?
: 例如gnuplot..
: 过年期间研究gnuplot很久,但是不太会用
: 我需要的功能很简单
: 只是给定座标,让程式自动产生该座标的图形
: (全部都是矩形)
: 原本是自己使用BCB来实做
: 但是因为资料过於庞大,超过BCB可以处理的范围
: 听朋友说可以考虑试试看使用gnuplot..
: 请问版上是否有gnuplot的高手呢
: 或是类似图形绘制的软体
: 资料很简单
: 只是单纯的座标资料
: 要处理的资料有两种
: 1. 2D资料
: 给定矩形的左下跟右上座标,绘制矩形
: 如
: 0,0,1,1 <--第一个矩形
: 0,0,2,3 <--第二个矩形
: ...
: (资料超过100万笔..)
: 2. 3D资料
: 资料只是一堆统计数字
: 分别代表x,y,z
: 如
: 1,2,3 (绘制时z轴由0开始延伸一条线直到该座标为止)
: 2,3,4
: ...
: gnuplot提供的范例很多是数学使用的
: 如sin,cos等,但我用不到这麽复杂@@
: 请问有比较简单操作的软体吗?
: 或是…能否请gnuplot高手指导一下以上两个资料该如何呈现@@
: 感谢^~^
不知道object能不能开这麽多个
我最後的解决方法是用vectors
其中"out"是矩形的档名
set term png
set output "rectangle.png"
set datafile separator ","
set style line 1 lt 1 lw 1
set style arrow 1 nohead ls 1
plot "out" using 1:2:($3-$1):(0) notitle with vectors arrowstyle 1,\
"out" using 1:2:(0):($4-$2) notitle with vectors arrowstyle 1,\
"out" using 1:4:($3-$1):(0) notitle with vectors arrowstyle 1,\
"out" using 3:2:(0):($4-$2) notitle with vectors arrowstyle 1
希望有帮到忙(1,000,000个随机矩形好像33秒完成吧)
第二个就用splot依此类推吧
vector的四个参数看这边
http://www.gnuplot.info/docs/node259.html#vectors
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.30.35
1F:推 drlai:感谢^^我试试看 02/18 10:26