Many elements in a Matplotlib figure can have their colors specified. There are several ways to do so. You will come across the color parameter as a keyword argument for style settings very often in different functions. The alternate abbreviated keyword c can often be used. We will first briefly introduce the general rule here.
Setting colors in Matplotlib
Single letters for basic built-in colors
There is a list of common colors we can quickly call with single letters:
- b: Blue
- g: Green
- r: Red
- c: Cyan
- m: Magenta
- y: Yellow
- k: Black
- w: White