Skip to content

plot_box: use parse_fmt for the format string #322

Backlog

Description

@petercorke

plot_box reads its format string by hand (graphics.py, the for f in fmt loop in the unfilled branch): any letter in rgbcmywk becomes the edge color, and every other character is joined into the line style. That works for "r--" and "r:", but a marker ("r."), a cycle color ("C0") or a color name ("red") gives a line style Matplotlib refuses.

PR 321 (open) adds parse_fmt, which reads these strings the way plt.plot does. There is likely a smell here, so it would be worth checking whether plot_box can use it once that PR is merged.

Activity

  1. added
    tech-debt
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions