First page Back Continue Last page Overview Graphics
Line Properties
Lines have various attributes to change the look, like linewidth, dash style, antialiased and so on
Example: Changing the line width
3 ways to do it:
- plt.plot([1,2,3,4,5], [1,4,9,16,25])
- line, = plt.plot([1,2,3,4,5], [1,4,9,16,25])
line.set_linewidth(2.0)
- lines = plt.plot([1,2,3,4,5], [1,4,9,16,25])
plt.setp(lines, color='r', linewidth=2.0)