SciDAVis 教學 2:作圖技巧及化直
作者:王一哲
日期:2019/12/4
作圖原則
- 假設自變數為、應變數為,先畫出關係圖,如果數據點看起來分布在一條斜直線上,利用線性迴歸畫出最接近直線,計算斜率、截距及其不準量;如果數據點看起來是分布在一條曲線上則進行步驟2。
- 計算 、,畫出關係圖,如果數據點看起來分布在一條斜直線上,利用線性迴歸畫出最接近直線,計算斜率、截距及其不準量,其中斜率可以代表、取幾次方時兩者的關係為線性。假設、數學關係為
因此關係圖的最接近直線斜率為。
- 計算 、,畫出關係圖,如果數據點看起來分布在一條斜直線上,利用線性迴歸畫出最接近直線,計算斜率、截距及其不準量。
自由落下時間與高度關係圖
假設小球原為靜止、離地面高度為、受到重力作用開始落下,只考慮重力的作用,重力加速度,小球在空中飛行時間為、飛行時間不準量為,實驗數據如下
h(m),t(s),errt(s)
2,0.65,0.01
4,0.89,0.01
6,1.11,0.01
8,1.27,0.01
10,1.42,0.01
12,1.57,0.01
14,1.71,0.01
16,1.79,0.01
18,1.92,0.01
20,2.03,0.01
先畫出關係圖,發現數據點應該是分布在一條曲線上,無法進行線性擬合。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
t - h 關係圖
接下來計算、,先在資料表中插入兩個空的欄位
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
插入空的欄位
為了避免空白列中的東西影響到公式計算結果,最好能移除多餘的列。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
移除多餘的列
選取空的欄位後,按右方的第3個分頁Formula,接著輸入公式
按下右上角的Apply套用公式,就可以計算欄位h當中所有數值的log值,再用同樣的方法計算欄位t當中所有數值的log值。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
輸入公式計算 log h
畫出關係圖,數據點看起來分布在一條斜直線上,線性擬合的結果為
可以推測關係圖的數據點應該會分布在一條斜直線上。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
log t - log h 關係圖
計算,畫出關係圖,線性擬合的結果為
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
t - 根號h 關係圖
自由落下物體飛行時間與高度的理論關係式為
因此關係圖最接近直線斜率理論值 ,百分誤差 。
雙狹縫干涉條紋寬度與縫距關係圖
假設雙狹縫的縫距為、干涉條紋寬度為、干涉條紋寬度不準量為,實驗數據如下
d(mm),y(mm),erry(mm)
0.10,6.2,0.1
0.20,3.0,0.1
0.30,2.2,0.1
0.40,1.5,0.1
0.50,1.3,0.1
先畫出關係圖,發現數據點應該是分布在一條曲線上,無法進行線性擬合。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
y - d 關係圖
接下來計算、,畫出關係圖,數據點看起來分布在一條斜直線上,線性擬合的結果為
可以推測關係圖的數據點應該會分布在一條斜直線上。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
log y - log d 關係圖
計算,畫出關係圖,線性擬合的結果為
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
y - 1/d 關係圖
雙狹縫干涉條紋寬度與狹縫縫距的理論關係式為
其中為波長、為狹縫到屏幕的距離,這裡使用的實驗數據為、,因此關係圖最接近直線斜率理論值 ,百分誤差 。
克卜勒第三行星運動定律
從網路上可以找到行星公轉軌道的資料,為了簡化數值,半長軸的單位為天文單位 (astronomical units, AU),公轉週期的單位為地球年 (yr)。
行星 |
公轉週期T (yr) |
半長軸 a (AU) |
水星 |
0.241 |
0.387 |
金星 |
0.615 |
0.723 |
地球 |
1.000 |
1.000 |
火星 |
1.881 |
1.524 |
木星 |
11.862 |
5.203 |
土星 |
29.458 |
9.555 |
天王星 |
84.022 |
19.218 |
海王星 |
164.774 |
30.110 |
先畫出關係圖,發現數據點應該是分布在一條曲線上,無法進行線性擬合。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
a - T 關係圖
接著再試著畫 關係圖,圖中的數據點分布在一條直線上,線性擬合結果為
可以推測關係圖的數據點應該會分布在一條斜直線上。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
log a - log T 關係圖
計算、,畫出 關係圖,線性擬合結果為
由於單位採用 AU 及 yr,最接近直線的斜率會很接近1。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
a3 - T2 關係圖
由於上圖中資料點對應的數值較大,坐標軸旁邊標示的數字太多,看起來很雜亂,這時我們會將和的數值同除以某個倍數再作圖。假設倍數為1000,則單位改為 及 ,圖片看起來會比較精簡。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
a3 - T2 關係圖(單位改為1000倍)
折射定律
當光從折射率為的介質射向折射率為的介質時,若,折射光會偏向法線,也就是入射角小於折射角,實驗數據如下表。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
折射定律示意圖
入射角 |
折射角 |
10 |
8 |
20 |
15 |
30 |
22 |
40 |
29 |
50 |
35 |
60 |
40 |
70 |
45 |
80 |
48 |
先畫出關係圖,發現數據點應該是分布在一條曲線上,無法進行線性擬合。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
θ2 - θ1 關係圖
接著再試著畫 關係圖,圖中的數據點依然不是分布在一條直線上,可以推測兩者的關係應該不是加上次方這麼單純。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
log θ2 - log θ1 關係圖
實際上折射定律為
計算 、,再畫出 關係圖,線性擬合結果為
由於這是光由空氣進到水中的實驗數據,、,最接近直線的斜率會很接近0.75,百分誤差。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
sin θ2 - sin θ1 關係圖