Ask Your Question
0

Filling an arc()

asked 2023-04-27 17:38:45 +0100

Cyrille gravatar image

I have not seen commands to fill an arc(). Is it possible. I want to use it to show an angle. But when I do that I have a deformation of the all plot (a bad scalling). Of course, I can correct this by an aspect_ratio but I have always problems to find the good one. Is there a trick.

edit retag flag offensive close merge delete

Comments

1
  • A polygon wth enough points to be perceived as an arc ?

  • What "deformation" ? With what code ?

If you want us to spend our time to understand your questions and answer them (if possible), take the time to write intelligible questions, not goddamn riddles...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2023-04-28 00:03:36 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-04-30 05:53:18 +0100

achrzesz gravatar image

If you need a sector or wedge of a circle, then use for example

disk((0.0,0.0), 1, (pi/4, 3*pi/4), color='lightgrey', ymin=0)

For more general arcs:

pp=[(0,0)]+[(x,1/x+5) for x in srange(0.5,10,0.1)]+[(0,0)]
polygon(pp,color='lightgrey')
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-04-27 17:38:45 +0100

Seen: 123 times

Last updated: Apr 30 '23