I am drawing rotated rectangle using matplotlib but I don't know how to adjust the angle?
rect = patches.Rectangle((int(arr[2])-0.5*int(arr[4]),int(arr[3])-0.5*int(arr[5])), int(arr[4]),int(arr[5]),
fill=False,
edgecolor='g', linewidth=1)
t = matplotlib.transforms.Affine2D().rotate_around(float(arr[2]), float(arr[3]),\
float(arr[6])*180/np.pi)
rect.set_transform(t + plt.gca().transData)
plt.gca().add_patch(rect)
1 10 3308 261 21 10 -88.363423
this is the data of one car
but the rectangel don't fit it.