I am not sure if it is the best solution, but maybe you could make a variable with some default values/headers which will be used if your data is empty.
Assuming your data is a list of lists with header, x and y:
def update_figure(data,value):
if len(data!=0):
pass
else:
data = ['Empty', [0], [0]]
header = data[0]
x = data[1]
y = data[2]
# do plot stuff ...
So basically you make a check if you have data, and if not, you feed your plotting routine with whatever you feel like will let the user know that the data is empty zero/nothing is plotted.