Skip to content

[Doc]: style string for matplotlib.pyplot.plot¶ #25326

Closed

Description

@martinlicht

Documentation Link

https://matplotlib.org/2.1.2/api/_as_gen/matplotlib.pyplot.plot.html

Problem

The documentation explains the line style marker. After listing format string characters and single-letter color abbreviations, it goes on with:

In addition, you can specify colors in many weird and wonderful ways, including full names ('green'), hex strings ('#8000'), RGB or RGBA tuples ((0,1,0,1)) or grayscale intensities as a string ('0.8'). Of these, the string specifications can be used in place of a fmt group, but the tuple forms can be used only as kwargs.

The first sentence suggests that you can use full names, hex, and RGBA tuple strings in addition to the color abbreviations in a format string.

Suggested improvement

Possible rephrase:

In place of a fmt group, you can specify colors in many weird and wonderful ways, including full names ('green'), hex strings ('#8000'), or grayscale intensities as a string ('0.8'). You can also use RGB or RGBA tuples ((0,1,0,1)), but the tuple forms can be used only as kwargs.

Activity

  1. rcomer commented on Feb 25, 2023

    @rcomer
    Member

    That version of the docs is rather old (2018). Do you find the most recent version better?
    https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html#matplotlib-pyplot-plot

  2. martinlicht commented on Feb 25, 2023

    @martinlicht
    Author

    Thank you, I didn't realize that documentation was from a much older version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions