Skip to content

Instantly share code, notes, and snippets.

View salogranada's full-sized avatar

Salomon Granada Ulloque salogranada

  • Bogotá, Colombia
View GitHub Profile
@thomasaarholt
thomasaarholt / plot_arc.py
Last active February 2, 2023 02:01
Create a matplotlib Arc patch to show the angle between two lines
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
Arc = matplotlib.patches.Arc
def halfangle(a, b):
"Gets the middle angle between a and b, when increasing from a to b"
if b < a:
b += 360
return (a + b)/2 % 360