Place a line at zero on my chart

I am new to matplotlib. My python3 program reads data from a sensor and outputs a chart using matplotlib.
It reads Temperature, air pressure and humidity.
On the temperature chart I wish to place a line at zero degrees on the y axis
This is my code

from openpyxl import Workbook
from openpyxl import load_workbook
wb = load_workbook(pathTo)
ws1 = wb['Sheet1']   
for row in range(3,ws1.max_row):
    if(ws1.cell(row,3).value is None):
        break
l1=Label(text="Temp "+str(ws1.cell(row,3).value))
l1.place(x=40,y=50

https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.axhline.html?highlight=axhline#matplotlib.axes.Axes.axhline

Thank you, but I have no idea how to introduce that to my code.
Further guidance appreciated

There are 10 examples linked in that doc page for how to use it. Unfortunately your code is just a code fragment, so it is not possible to help you explicitly.

This is my code in full. The LastT function is where I wish to draw a line across the graph
I include my code in full and remind you I am only a beginner so it may not be very elegant

import matplotlib.pyplot as plt
import pandas as pd
import xlrd
import openpyxl
import os
from tkinter import *
from tkinter import messagebox
root=Tk()
root.title(“Tam Pepper Programming”)

root.geometry(‘350x150’)
#Centre the Window
root.eval(‘tk::PlaceWindow . center’)

def GetFile():
from tkinter import filedialog
filename = filedialog.askopenfilename(initialdir = “C:\Users\user\Desktop\Pi\Graph”,
title = “Select a File”,
filetypes = ((“Excel files”,
.xlsx”),
(“all files”,
.”)))
global pathTo
pathTo=str(filename)
print(pathTo)
global df
df=pd.read_excel(pathTo, ‘Sheet1’ )

def LastT():
from openpyxl import Workbook
from openpyxl import load_workbook
wb = load_workbook(pathTo)
ws1 = wb[‘Sheet1’]
for row in range(3,ws1.max_row):
if(ws1.cell(row,3).value is None):
break
l1=Label(text="Temp "+str(ws1.cell(row,3).value))
l1.place(x=40,y=50)
plt.show()

def LastP():

from openpyxl import Workbook
from openpyxl import load_workbook
wb = load_workbook(pathTo)
ws1 = wb['Sheet1']
for row in range(4,ws1.max_row):
    if(ws1.cell(row,4).value is None):
        break
l1=Label(text="Pressure "+str(ws1.cell(row,4).value))
l1.place(x=240,y=50)

def LastH():
#pathTo=“W:\WeatherData\2021-01-19.xlsx”
from openpyxl import Workbook
from openpyxl import load_workbook
wb = load_workbook(pathTo)
ws1 = wb[‘Sheet1’]
for row in range(5,ws1.max_row):
if(ws1.cell(row,5).value is None):
break
l1=Label(text="Humidity "+str(ws1.cell(row,5).value))
l1.place(x=140,y=50)
#print(ws1.cell(row,5).value)

def GetTime():
path = pathTo
wb_obj = openpyxl.load_workbook(path)
sheet_obj = wb_obj.active
cell_obj = sheet_obj.cell(row = 2, column = 2)
#print(str((cell_obj.value)))
startTime=(str((cell_obj.value)))
#print("StartTime was " + str(startTime[0:8]))
messagebox.showinfo(“AlbaSoft”,"Start Time was "+str(startTime[0:8]))

def GetDate():
path = pathTo
wb_obj = openpyxl.load_workbook(path)
sheet_obj = wb_obj.active
cell_obj = sheet_obj.cell(row = 2, column = 1)
#print(str((cell_obj.value)))
startDate=(str((cell_obj.value)))
#print("StartDate was " + str(startDate[0:10]))
messagebox.showinfo(“AlbaSoft”,"Start date was "+str(startDate[0:10]))

def But1():
#set plot sizw
plt.figure(figsize=(14, 6))
plt.plot(df[str(‘Temperature’)], ls=’-’)
# set label
plt.xlabel(‘Hours since start’)
plt.ylabel(‘temp’)
plt.title(‘Temperature “C”’)
#plt.legend(‘Legend’)
plt.show()

def But2():
#set plot
plt.figure(figsize=(14, 6))
plt.plot(df[str(‘Pressure’)], ls=’-’)
# set label
plt.xlabel(‘Hours since start’)
plt.ylabel(‘pressure’)
plt.title(‘Air Pressure’)
#plt.legend(‘Legend’)
plt.show()

def But3():
#set plot
plt.figure(figsize=(14, 6))
plt.plot(df[str(‘Humidity’)], ls=’-’)
# set label
plt.xlabel(‘Hours since start’)
plt.ylabel(’% humid’)
plt.title(‘Humidity’)
#plt.legend(‘Legend’)
plt.show()

#QUIT program
def close_window():
root.destroy()

#Definitions must be declared before the button that calls it

#Place the Buttons
b1=Button(text=“Temperature”,command=But1)#react to button press
b1.place(x=30,y=10)#Position button
#l1=Label(text="Temperature is ")
#l1.place(x=50,y=90)

b2=Button(text=“Pressure”,command=But2)#react to button press
b2.place(x=250,y=10)#Position button

b3=Button(text=“Humidity”,command=But3)#react to button press
b3.place(x=150,y=10)#Position button

#QUIT BUTTON
bQuit=Button(text=“Quit”,command=close_window)
bQuit.place(x=160,y=100)

GetFile()
LastT()
LastP()
LastH()

root.mainloop

The sensor puts a reading every hour onto an excel spreadsheet.
My program produces a graph as I want.
I would really like a line at the zero degrees x axis.
This is what I am getting at the moment

Solved
I added to the program that reads the sensor and adds the reading to the excel sheet.
This now puts a zero in a column ever time it reads the sensor.
Now when I make a graph it reads from the zero column and now the graph code is
def But1():
plt.figure(figsize=(14, 6))
plt.plot(df[str(‘Temperature’)], ls=’-’)
plt.plot(df[str(‘Zero’)], ls=’-’)
plt.xlabel(‘Hours since start’)
plt.ylabel(‘temp’)
plt.title(‘Temperature “C”’)
plt.show()

The graph is now

Just do plt.axhline(0) matplotlib.pyplot.axhline — Matplotlib 3.3.4 documentation

Thank you so much. This is exactly what I was looking for.
That is a more elegant way than mine.
Although both work.