
第六章
2D 圖形繪製
I’ve been looking so long at these pictures of you
that I almost believe that they’re real
I’ve been living so long with my pictures of you
that I almost believe that the pictures are all I can feel
The Cure, “Pictures of You”
6.0 導論
在眾多數學軟體中,Mathematica 能從中脫穎而出受到許多老師青睞,原因之一便是其
優越的繪圖功能。本章著重在介紹 2D 圖形繪製,Mathematica 具備多元化的繪圖指令
以及圖形設定供自訂調整。最常見的繪圖需求是函數作圖以及數列作圖,訣竅 6.1 及 6.4
分別介紹以
Plot
及
ListPlot
指令進行作圖。若需要進行直角座標系以外的 2D 作圖,
訣竅 6.2 與 6.3 中的
PolarPlot
與
ParametricPlot
可進行極座標繪圖以及參數式繪圖。
由於 Mathematica 本質上為符號運算系統,其所有圖形均可視為繪圖基本元件(graphics
primitives)與圖形指令(directives)的組合。基本元件包含
點
Point
與
線
Line
等物件,
指令則包含
線寬
Thickness
與
色相
Hue
等設定。你可以用繪圖基本元件進行低階的繪圖
(訣竅 6.8),但大多數較常使用
Plot
或
ListPlot ...