I am creating a bar graph essentially just by only using the graphics module. I am stuck with it. Below is my code that I have done which creates a perfect square. (10 x 10) so for every one bar I was it to decrease by 10.
def drawRectanglePatch(win, x, y): Point(200,200) for i in range(10): for j in range(10): topLeftX = x + i * 10 topLeftY = y + j * 10 rectangle = Rectangle(Point(topLeftX, topLeftY), Point(topLeftX + 10 , topLeftY + 10 )) rectangle.setFill("red") rectangle.setOutline("red") rectangle.draw(win)
Thanks in advance