iT邦幫忙

DAY 8
1

蠻可愛的資料庫與資料處理系列 第 8

Gnuplot 簡單數據繪圖

假設的資料存檔為 data1.txt
內容如下:

1  22
2  56
3  87
4  6
5  46
6  56
7  59
8  84
9  90
10 29
11 61
12 13

進入Gnuplot互動模式:

注意: gnuplot> 是互動模式的提示符號,無須輸入.

輸入以下指令:

gnuplot> set xlabel "月份"
gnuplot> set ylabel "亂數"
gnuplot> set title "亂數數據"
gnuplot> unset key
gnuplot> set xrange [0.5 : 12.5]
gnuplot> set xtics 1 ,1 ,12
gnuplot> plot "data1.txt"

這樣是只有點.
接著再下

gnuplot> plot "data1.txt" with line

圖形產生變化,用線將各點連接了.

但是這時候有線無點.
再下

gnuplot> plot "data1.txt" with linespoints pointtype 7 pointsize 1

使用圓點繪製.

Gnuplot很輕易的就可以畫出圖形來,中文也能通.


上一篇
來畫點圖吧
下一篇
Gnuplot 畫兩組數據
系列文
蠻可愛的資料庫與資料處理30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言