Course Content
Visualization in Python with matplotlib
Visualization in Python with matplotlib
Changing Line Style
Good! More customizing stuff to go!
Additionally, we can customize more line parameters, such as color, line style, points style. These are the simplest, but the .plot()
function has many more parameters available to set (you can read about this in the documentation). Let's consider all of the mentioned parameters:
Parameter | Python syntax | Description |
Color | color or c | Set the color of the line (and points). Possible values for this parameter are in documentation. |
Line style | linestyle or ls | Sets the style of line (for example, dashed or dotted). Possible values for this parameter are in documentation. |
Points style | marker | Sets the marker type (for example, circle or triangle points). Possible values for this parameter are in documentation. |
For example, let's modify our example plot even more!
Everything was clear?
Section 1. Chapter 10