Pyplot Colors

In Pyplot, blue and tab:blue select different colors; the tab: prefix names the Tableau palette.

No items found.

tab:blue is #1F77B4; blue is #0000FF. C0 follows the active property cycle, so a style can change it. See Matplotlib’s color formats.

Choose a color explicitly

import matplotlib.pyplot as plt

x = [0, 1, 2]
for y, color in [([0, 1, 2], "tab:blue"), ([1, 2, 1], "tab:orange"), ([2, 1, 0], "tab:green")]:
    plt.plot(x, y, color=color, label=color)
plt.legend()
plt.show()
Pyplot Colors swatches: tab:blue, tab:orange, tab:green, tab:red, tab:purple, tab:brown, tab:pink, tab:gray, tab:olive.

Shades

Palettes

No items found.