Skip to content

[ENH]: Please add matplotlib.patches.RoundedRectangle #27969

@dipeshSam

Description

@dipeshSam

Problem

  • I'm always frustrated when matplotlib.patches.Rectangle does not round the corners of the rectangle because it requires padding and other rectangle-irrelevant values.
  • I would like it if there is a clsas or method like matplotlib.patches.RoundedRectangle(xy, width, height, corner_radius, **kwargs) that can take any radius <= min(width, height) because matplotlib.patches.FancyBboxPatch does not round the rectangle as much as possible.
  • Here is a sample image of what I am asking for
    rect_showing

Proposed solution

Please add/implement matplotlib.patches.RoundedRectangle(xy, width, height, corner_radius, **kwargs)

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