其中輸出格式因印表機而有所不同,列印的命令也隨作業系統而有差異,下 面以 UNIX 和 DOS 二作業系統為例說明。
gnuplot> plot sin(x) gnuplot> set terminal postscript Terminal type set to 'postscript' Options are 'landscape . . . . gnuplot> set output 'sin.ps' gnuplot> replot gnuplot> quit % lp -d sparc sin.ps
因為 UNIX 作業系統提供有 pipe 功能,故可將輸出直接傳給 lp 命令印 在指定的印表機只要將 output 參數改變如下即可:
gnuplot> set output '|lp -d sparc'
gnuplot> plot sin(x)
gnuplot> set terminal epson_180dpi
Terminal type set to 'epson_180dpi'
gnuplot> set output 'sin.ep'
gnuplot> replot
gnuplot> quit
C:gnuplot> copy sin.ep /b lpt1:
讀者可以發現這裡不同於前一小節之處,只有終端機格式設定和作業 系統列印命令而已。
\documentstyle[psfig]{article}
...
\begin{figure}[h]
\psfig{figure=PlotDots.ps,width=4in,height=2.5in,angle=-90}
\caption{Plotting Points}
\end{figure}
...
有關 UNIX 作業系統上的圖文整合方面,請參考 ASPAC 文件``X 環境 下圖文整合'' (註二)。
gnuplot> plot "data"
gnuplot> set terminal tgif
Terminal type set to 'tgif'
gnuplot> set output "model2.obj"
gnuplot> replot
用 tgif 修改過的資料和新模型比對圖

除了 tgif 軟體外,許多其他的繪圖工具也可以對輸出圖形加工,gnuplot 支援多種圖形檔格式(註五),只要所用的繪圖工具能接受其中一種格式就可 以,例如 fig(xfig), gpic(groff) 等,修飾完成後再選擇適當格式輸出。 除了置入文件外,也可用來印製投影片或做其它用途。
(註一) 關於 gnuplot 所能輸出的圖形檔案格式,請參考 ASPAC 文件 ``gnuplot 使用手冊'' 6.2 節。
(註二) 此文件的 Postscript 版可在 ftp://phi.sinica.edu.tw/pub/aspac/doc/94/94001.ps 找到。
(註三) 請參考 ASPAC 文件 ``gnuplot 使用手冊''的第 4 章。
(註四) 有關 tgif 的使用,請參考 ASPAC 文件``X 環境下圖文整合'' 4.4.2 節。
(註五) 請參考 ASPAC 文件 ``gnuplot 使用手冊'' 6.2 節。
目錄 | 用 gnuplot 檢視數值資料 | 其他