製圖 - Linux

By Jacky
at 2010-01-07T15:24
at 2010-01-07T15:24
Table of Contents
※ 引述《kzgiant (嘟嘟)》之銘言:
: 有很大量的資料要畫成圖表
: 用openoffice貼好,再做成表格會累死。
: 輸入資料
: date.txt
: 0 0 0 0 0 0
: 0 1 1 1 1 0
: 0 1 1 2 1 0
: 0 1 2 2 2 1
: 0 1 1 1 1 1
: 0 0 0 0 0 0
: 有程式 可以直接吃整個份資料
: 畫出3D的曲面圖嗎?
: gnuplot能畫曲面圖嗎?
: 謝謝
gnuplot要畫成3D的曲面圖...
不知道你指的是不是這個像是這樣的:
http://gnuplot.sourceforge.net/demo_4.2/surface1.html
(不過上述的Demo都是用公式去畫出來的。)
如果是這種3D 的surface圖的話。
可以在進入gnuplot之後試試下列的方法:
資料類型為Matrix:(就是上面你給的data.txt)
splot 'data.txt' matrix with lines
這個時候你就會看到圖出來了,然而x-axis 和 y-axis卻則無任何意義.
如果要調整x-axis和y-axis的單位的話
set xtics ("100" 0, "200" 1, "300" 2)
在x軸線上的第一個值定為100,第二個值定為200....以此類推
set ytics ("100" 0, "200" 1, "300" 2)
之後再
replot
圖就出來了。
如果覺得這樣畫出來的圖沒有顏色,可以再加個指令
set pm3d
replot
這個時候會變得炫一點。
以上的gnuplot細節可以參考這個網站:
http://t16web.lanl.gov/Kawano/gnuplot/datafile-e.html#matrix
http://t16web.lanl.gov/Kawano/gnuplot/plotpm3d-e.html#6.7OD
--
: 有很大量的資料要畫成圖表
: 用openoffice貼好,再做成表格會累死。
: 輸入資料
: date.txt
: 0 0 0 0 0 0
: 0 1 1 1 1 0
: 0 1 1 2 1 0
: 0 1 2 2 2 1
: 0 1 1 1 1 1
: 0 0 0 0 0 0
: 有程式 可以直接吃整個份資料
: 畫出3D的曲面圖嗎?
: gnuplot能畫曲面圖嗎?
: 謝謝
gnuplot要畫成3D的曲面圖...
不知道你指的是不是這個像是這樣的:
http://gnuplot.sourceforge.net/demo_4.2/surface1.html
(不過上述的Demo都是用公式去畫出來的。)
如果是這種3D 的surface圖的話。
可以在進入gnuplot之後試試下列的方法:
資料類型為Matrix:(就是上面你給的data.txt)
splot 'data.txt' matrix with lines
這個時候你就會看到圖出來了,然而x-axis 和 y-axis卻則無任何意義.
如果要調整x-axis和y-axis的單位的話
set xtics ("100" 0, "200" 1, "300" 2)
在x軸線上的第一個值定為100,第二個值定為200....以此類推
set ytics ("100" 0, "200" 1, "300" 2)
之後再
replot
圖就出來了。
如果覺得這樣畫出來的圖沒有顏色,可以再加個指令
set pm3d
replot
這個時候會變得炫一點。
以上的gnuplot細節可以參考這個網站:
http://t16web.lanl.gov/Kawano/gnuplot/datafile-e.html#matrix
http://t16web.lanl.gov/Kawano/gnuplot/plotpm3d-e.html#6.7OD
--
Tags:
Linux
All Comments

By Liam
at 2010-01-07T20:45
at 2010-01-07T20:45

By Mason
at 2010-01-11T12:20
at 2010-01-11T12:20
Related Posts
執行 shell script 卻沒顯示執行結果

By Cara
at 2010-01-07T14:01
at 2010-01-07T14:01
製圖

By Annie
at 2010-01-07T14:00
at 2010-01-07T14:00
怎麼更新gcin?

By Ida
at 2010-01-07T13:00
at 2010-01-07T13:00
lm-sensor

By Ida
at 2010-01-07T12:19
at 2010-01-07T12:19
製圖

By Faithe
at 2010-01-07T11:32
at 2010-01-07T11:32