Gnuplot學習筆記 安裝gnuplot-x11(可輸出至X11)協助 $gnuplot gnuplot>help some_command樣本 #輸出 set term postscript eps enhanced size 3.7,5 #enhanced使用增強文本,size 圖的大小(英寸),terminal預設為wxt(X11) set output "psr.eps" #輸出檔案名 #座標軸 set xlabel "Period (s)" #x軸label set logscale x #設x軸為對數座標 set xtics 1e-9,-1000,1e-24 #x軸標度範圍 #set xtics (2,4,6,8,10) set xr [0.001:20] #x軸範圍 set ydata time #設y軸資料為時間 set timefmt "%H:%M:%S" #設定時間格式 set format y "%g{/Symbol \260}" #y軸標度格式 #標註 set key 0.01,100 #legend位置 #unset key #取消legend set arrow from 0.1,2 to 0.2,3 #箭頭 set label "peak" at 0.01,10 rotate by 10 #標籤 #變數 a=3*2**3 #作圖 plot "a.dat" using 1:2 title 'relation' with points pointtype 6 linetype rgb "red" pointsize 1,\ #資料檔案作圖 x**2 with line linetype 5 #函數做圖檔案轉換eps->pdf(否則直接插入tex中enhance文本會顯示異常) epstopdf *.eps pdflatex *.pdf增強文本運算子 ^ a^x 上標 \superscript_ a_x 下標 \subscript@ a@^b_c 上標和下標同時出現 \phantom box (occupies no width)& &{space} 插入指定寬度空白 \inserts space of specified length~ ~a{0.8-} 將後字元放在前字元的頂部 \overprints '-' on 'a', raised by 0.8 times the current fontsize