About 31,000 results
Open links in new tab
  1. How to write simple geometric shapes into numpy arrays

    Apr 5, 2012 · 38 I would like to generate a numpy array of 200x200 elements in size and put into it a circle centered into 100,100 coordinates, radius 80 and stroke width of 3 pixels. How to do …

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

    The Python module is called WKTPlot, and uses Bokeh to make interactive plots of your data. I have examples on how to plot WKT string data as well as data from Shapefiles. It supports all …

  3. python - How to draw a rectangle on image - Stack Overflow

    Here is PIL's ImageDraw method to draw a rectangle. Here is one of OpenCV's methods for drawing a rectangle. Your question asked about Matplotlib, but probably should have just …

  4. How to draw a shape inside a pdf with python? - Stack Overflow

    Aug 24, 2021 · I would like to draw a shape such as a rectangle inside pdf. I have tried with the below code, but it is adding a text in pdf. How can I draw it? # Add text to Existing PDF using …

  5. Is there a way to draw primitives in 3D with Python?

    Oct 3, 2012 · I want to draw 3D primitives like spheres, cylinders and planes (patches) in a 3D plot and I would like to be able to interactively rotate, translate and zoom the scene. I want to …

  6. Create random shape/contour using matplotlib - Stack Overflow

    Jun 7, 2018 · One option is hence to create such shapes interactively. This is shown in the question Interactive BSpline fitting in Python . If you want to create random shapes …

  7. python - Draw transparent rectangles and polygons in pygame

    Feb 1, 2024 · So you can't draw transparent shapes directly with the 'pygame.draw' module. The 'pygame.draw' module does not blend the shape with the target surface. You have to draw the …

  8. Drawing a shape turtle python - Stack Overflow

    Nov 5, 2013 · Drawing a shape turtle python Asked 11 years, 11 months ago Modified 11 years, 11 months ago Viewed 8k times

  9. python - User input to draw shapes using Turtle - Stack Overflow

    Dec 8, 2016 · This is supposed to be a menu-driven program with user input. I know very little about turtle. I do know how to have the shapes drawn, but the info that I have is not given as …

  10. Simpler way to draw a circle with tkinter? - Stack Overflow

    Aug 9, 2021 · Drawing a circle on a tkinter Canvas is usually done by the create_oval method. However, supplying the bounding box is often a confusing way to think about drawing a circle. …