About 33,300,000 results
Open links in new tab
  1. tkinter - How to draw polygons with Python? - Stack Overflow

    May 15, 2017 · If you want to draw polygons on a matrix representing an image, scikit-image has 3 functions for you: skimage.draw.polygon2mask(image_shape, polygon) that directly returns …

  2. Draw any polygon in Turtle – Python - GeeksforGeeks

    Feb 10, 2020 · In this article, we will learn how to draw different shaped Polygons using Turtle module. Given the number of sides (n) and length of sides (l), one can easily draw any …

  3. Shapes in Python - Plotly

    As a general rule, there are two ways to add shapes (lines or polygons) to figures: Trace types in the scatter family (e.g. scatter, scatter3d, scattergeo etc) can be drawn with mode="lines" and …

  4. Python Pygame Draw Polygon Guide - PyTutorial

    Jan 7, 2025 · To draw a polygon, use the pygame.draw.polygon function. This function takes the surface, color, and a list of points as arguments. The points define the vertices of the polygon. …

  5. Drawing a Polygon in Turtle - Python - Tpoint Tech - Java

    Mar 17, 2025 · This lesson will teach us how to use a turtle in Python turtle library to draw a polygon. We should know a little bit about polygons before continuing. A polygon is a type of …

  6. How to create and plot polygons in python using shapely and

    Nov 15, 2023 · In this article, we will explore how to plot polygons in python using shapely library. Shapely is a python package for computational geometry which provides easy access to …

  7. How do I plot Shapely polygons and objects using Matplotlib?

    Apr 29, 2019 · If you can get individual lists of the x and y coordinates for your polygon you can plot like: plt.plot(polygon_x,polygon_y). You'll also have to append the first elements to the end …

  8. How to Draw Shapes in Matplotlib with Python - GeeksforGeeks

    Jul 22, 2024 · Drawing shapes in Matplotlib is simple and provides a wide range of options for creating and customizing displays. Using the Rectangle, Circle, and Polygon classes, you can …

  9. How to Draw Different Shapes Using Tkinter - AskPython

    Jan 29, 2022 · 4. Polygon. We can draw as many vertices as we want. We use the create_polygon() method which takes coordinates of edges and renders them accordingly on …

  10. geometry - How do I draw a polygon in python? - Stack Overflow

    Jul 29, 2014 · The polygon they form is effectively an extremely flat triangle. Try varying one of the points so that it doesn't line up with the other two. pygame.draw.polygon(screen, black, …

Refresh