matplotlib find where line hits x axis code example Example: import matplotlib plt import matplotlib.pyplot as plt