作者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