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.
There is a list of common colors we can quickly call with single letters:
b
: Blueg
: Greenr
: Redc
: Cyanm
: Magentay
: Yellowk
: Blackw
: White
Examples are coral
, gold
, springgreen
, deepskyblue
, and blueviolet
. You can find the full list here: https://matplotlib.org/examples/color/named_colors.html.