8000 Single-character colors do not match long names · Issue #17591 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Single-character colors do not match long names #17591
Closed
@QuLogic

Description

@QuLogic

Bug report

Bug summary

According to our docs:

one of {'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}, they are the single character short-hand notations for blue, green, red, cyan, magenta, yellow, black, and white.

Code for reproduction

import matplotlib.pyplot as plt

fig, ax = plt.subplots()
for i, long in enumerate('blue green red cyan magenta yellow'.split()):
    short = long[0]
    ax.plot([0], c=long, label=long)
    ax.plot([0], c=short, label=short)
ax.legend()

plt.show()

Actual outcome

Figure_1

Expected outcome

cyan/c, magenta/m, yellow/y should match each other. I don't think we can change these unless we do a 4 release, so I've labelled this as a documentation fix.

Matplotlib version

  • Matplotlib version: master
  • Matplotlib backend (print(matplotlib.get_backend())): Tkagg
  • Python version: 3.6.8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects 392C

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0