ECE201 - Lab Sheet 9
ECE201 - Lab Sheet 9
Style:
Line Styles Markers Colors
• '-' : Solid line • 'o' : Circle • 'r' : Red
• '--' : Dashed line • '+' : Plus sign • 'g' : Green
• ':' : Dotted line • '*' : Asterisk • 'b' : Blue
• '-.' : Dash-dotted line • '.' : Point • 'c' : Cyan
• 'x' : Cross • 'm' : Magenta
• 's' : Square • 'y' : Yellow
• '^' : Upward-pointing • 'k' : Black
triangle • 'w' : White
• 'v' : Downward-
pointing triangle
• '>' : Right-pointing
triangle
• '<' : Left-pointing
triangle
Examples of Usage
Combine these elements to customize the plot style:
• plot(x, y, 'r--') : Red dashed line
Electrical Engineering Department قسم الهندسة الكهربائية
Code
Electrical Engineering Department قسم الهندسة الكهربائية
Output
2. Plot the function y=3x2 sin(x), between 0≤x≤2π with 50 samples. (Plot should
include Title, xlabel, and ylabel).
Code
Electrical Engineering Department قسم الهندسة الكهربائية
Output
Electrical Engineering Department قسم الهندسة الكهربائية
Code
Output
Electrical Engineering Department قسم الهندسة الكهربائية