Matlab 畫圖 (線形、顏色、數據點形狀的選擇)


Matlab 畫圖

線形、顏色、數據點形狀的選擇

線形

- Solid line (default)
-- Dashed line
: Dotted line
-. Dash-dot line


顏色

r Red
g Green
b Blue
c Cyan
m Magenta
y Yellow
k Black
w White


數據點的形狀

+ Plus sign
o Circle
* Asterisk
. Point
x Cross
'square' or s Square
'diamond' or d Diamond
^ Upward-pointing triangle
v Downward-pointing triangle
> Right-pointing triangle
'pentagram' or p Five-pointed star (pentagram)
'hexagram' or h Six-pointed star (hexagram)


例子

Plot the sine function over three different ranges using different line styles, colors, and markers.

t = 0:pi/20:2pi;
plot(t,sin(t),'-.r
')
hold on
plot(t,sin(t-pi/2),'--mo')
plot(t,sin(t-pi),':bs')
hold off

效果如下圖:

2016/1/14 11:24:29


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM