Skip to content

Single-character colors do not match long names #17591

@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

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy