About 48,900 results
Open links in new tab
  1. matplotlib.patches.Rectangle — Matplotlib 3.10.8 documentation

    A rectangle defined via an anchor point xy and its width and height. The rectangle extends from xy[0] to xy[0] + width in x-direction and from xy[1] to xy[1] + height in y-direction.

  2. How to Draw Rectangles in Matplotlib (With Examples) - Statology

    Nov 10, 2020 · To draw a rectangle in Matplotlib, you can use the matplotlib.patches.Rectangle function, which uses the following syntax: matplotlib.patches.Rectangle (xy, width, height, angle=0.0) where: …

  3. matplotlib.patches.Rectangle in Python - GeeksforGeeks

    Jul 12, 2025 · matplotlib.patches.Rectangle The matplotlib.patches.Rectangle class is used to rectangle patch to a plot with lower left at xy = (x, y) with specified width, height and rotation angle.

  4. Matplotlib Draw Rectangle: Add, Fill, Annotate & Highlight Regions ...

    Jan 30, 2021 · Learn how to draw rectangle on plot in Matplotlib using patches. Complete Python tutorial with multiple examples

  5. 4 Ways to Draw a Rectangle in Matplotlib - Python Pool

    Feb 10, 2021 · Hello, geeks, and welcome to today’s article; we will cover the Matplotlib draw a rectangle. Along with that, we will also look at its syntax and parameters for a better overall …

  6. How to Properly Draw Rectangles in Matplotlib and Python

    Dec 18, 2023 · In this Matplotlib and Python tutorial, we thoroughly explain how to draw rectangles in Python and how to adjust the rectangle properties, such as transparency, face color, edge color, …

  7. Python Calculate Area, Perimeter, Diagonal of Rectangle [5 ... - PYnative

    Apr 17, 2025 · Learn different ways to calculate the Area, Perimeter and Diagonal of a Rectangle using Python, with detailed explanations and examples.

  8. How To Draw Rectangles In Matplotlib (With Examples)

    Dec 18, 2025 · Beyond standard plotting, Matplotlib also offers precise tools for drawing geometric shapes, such as rectangles, which are essential for highlighting regions of interest (ROIs) on plots or …

  9. How to Draw a Rectangle in a Matplotlib Plot?

    We can directly use matplotlib.patches.Rectangle class to draw a rectangle in a matplotlib plot.

  10. Python OpenCV | cv2.rectangle() method - GeeksforGeeks

    Aug 14, 2025 · cv2.rectangle () function in OpenCV is used to draw a rectangle shape on an image. By specifying starting and ending coordinates, color and thickness, you can highlight or mark specific …