线形- Solid line (default)-- Dashedline: Dotted line-. Dash-dotline
颜色r Redg Greenb Bluec Cyanm Magentay Yellowk Blackw White
数据点的形状+ Plus signo Circle* Asterisk.Pointx Cross'square' or s Square'diamond' or d Diamond^ Upward-pointingtrianglev Downward-pointing triangle>Right-pointing triangle'pentagram' or p Five-pointed star (pentagram)'hexagram' or h Six-pointed star (hexagram)
Examples
Plot the sine function over three different rangesusing different line styles, colors, andmarkers.t = 0:pi/20:2*pi;plot(t,sin(t),'-.r*')hold onplot(t,sin(t-pi/2),'--mo')plot(t,sin(t-pi),':bs')hold off
RGB Value | Short Name | Long Name |
---|---|---|
[1 1 0] | y | yellow |
[1 0 1] | m | magenta |
[0 1 1] | c | cyan |
[1 0 0] | r | red |
[0 1 0] | g | green |
[0 0 1] | b | blue |
[1 1 1] | w | white |
[0 0 0] | k | black |