Hello i have to draw an arc with matplotlib, i have the following data:
{‘handle’: ‘39D’, ‘owner’: ‘1F’, ‘layer’: ‘AM_0’, ‘center’: Vector(1000.0, -1256.595067376733, 0.0), ‘radius’: 2100.0, ‘start_angle’: 67.75727639121727, ‘end_angle’: 112.2427236087827}
basically i have :
Center of the arc
Starting angle
end angle.
Do you have any suggestion
On Mon, Nov 2, 2020 at 5:02 AM Luca Bertolotti <[email protected]> wrote:
Hello i have to draw an arc with matplotlib, i have the following data:
{‘handle’: ‘39D’, ‘owner’: ‘1F’, ‘layer’: ‘AM_0’, ‘center’: Vector(1000.0, -1256.595067376733, 0.0), ‘radius’: 2100.0, ‘start_angle’: 67.75727639121727, ‘end_angle’: 112.2427236087827}
basically i have :
Center of the arc
Starting angle
end angle.
Do you have any suggestion
On Mon, Nov 2, 2020 at 8:36 AM Luca Bertolotti <[email protected]> wrote:
Hy Paul
I heve read it but i’m not able to draw it:
The data that i have are:
{‘handle’: ‘39D’, ‘owner’: ‘1F’, ‘layer’: ‘AM_0’, ‘center’: Vector(1000.0, -1256.595067376733, 0.0), ‘radius’: 2100.0, ‘start_angle’: 67.75727639121727, ‘end_angle’: 112.2427236087827}
h= float(2* entity.dxf.radius)
I have try this:
b = Arc((float(xr), float(yr)), (h, h),0, float(entity.dxf.end_angle), float(entity.dxf.end_angle) , color=‘red’, lw=1)
ax.add_patch(b)
But i get:
Exception “unhandled TypeError”
can’t multiply sequence by non-int of type ‘float’
File: c:\users\luca\appdata\local\programs\python\python38\lib\site-packages\matplotlib\patches.py, Line: 1427
Can you help me
Bets Regards
Il giorno lun 2 nov 2020 alle ore 17:07 Paul Hobson <[email protected]> ha scritto:
On Mon, Nov 2, 2020 at 5:02 AM Luca Bertolotti <[email protected]> wrote:
Hello i have to draw an arc with matplotlib, i have the following data:
{‘handle’: ‘39D’, ‘owner’: ‘1F’, ‘layer’: ‘AM_0’, ‘center’: Vector(1000.0, -1256.595067376733, 0.0), ‘radius’: 2100.0, ‘start_angle’: 67.75727639121727, ‘end_angle’: 112.2427236087827}
basically i have :
Center of the arc
Starting angle
end angle.
Do you have any suggestion