在這種情況下使用 gnuplot 畫圖,其意義不同於第 2 章的使用方式。
第 2 章的情況是已經有處理完畢的資料要分析,但不清楚要用何種方
式繪圖觀察,所以一邊畫圖,一邊根據圖形調整資料的表現方式,直到
找出資料的意義。在程式中呼叫 gnuplot 時,必須已經清楚資料表現
的方式,gnuplot 只是單純地將數值資料轉成指定的圖形,也可能設
計成不必等到程式結束才繪圖,而是計算到一定階段就畫圖檢查結果。
這樣設計的意義和自行撰寫程式來繪圖是一樣的,但可減少自行撰寫時
間和精力的浪費。
gnuplot> set terminal 'kc_tek40xx'
其中的 `c' 是彩色 (color) 的意思。
當然您也不一定要用 MS-DOS Kermit 才能看到圖形,其他可以模擬 Tektronix 繪圖的通訊軟體通常也行,例如 NCSA Telnet , 但所用的 terminal 設定會有些不同,這些設定可以參考 ASPAC 文件 ``gnuplot 使用手冊''的 6.2.1 節。
gnuplot> load "script.gp"
gnuplot> save "script.gp"
gnuplot> help
GNUPLOT is a command-driven interactive function plotting
program.
For help on any topic, type `help` followed by the name
of the topic.
The new GNUPLOT user should begin by reading the `introduction`
topic (type `help introduction`) and about the `plot` command
(type `help plot`). Additional help can be obtained from the
USENET newsgroup comp.graphics.gnuplot.
Help topics available:
autoscale binary-data bugs cd
clear comments copyright environment
exit expressions help introduction
line-editing load pause plot
print pwd quit replot
reread save set shell
show splot startup substitution
userdefined
Help topic: _
|
|---|
如果在 Help topic: 之後鍵入 plot ,就可以看到有關 plot 命令的說明,plot 的說明末尾還有列出更細的說明 項目:
. . . . .
Subtopics available for plot:
data-file datafile errorbars parametric
ranges style title with
Subtopic of plot:
在 Subtopic of plot: 之後可再鍵入項目繼續查詢。
(註一) 詳細的方法請參考 ASPAC 文件 ``gnuplot 使用手冊''的附錄 B 。
(註二) 有關 MS-DOS Kermit 模擬 Tektronix 繪圖終端機的使用,請參考 ASPAC 文件 ftp://phi.sinica.edu.tw/pub/aspac/doc/94/94008.ps找到。(註三) 獲得這些作業系統上的 gnuplot 可執行檔的方法,請參考 ASPAC 文件 ``gnuplot 使用手冊'' 2.1 節。
(註四) Macintosh 版的 gnuplot 可執行檔可以在 ftp://imaux.mgt.ncu.edu.tw/pub/mac/umich/graphics/graphicsutil/gnuplot3.5.cpt.hqx得到。