Animating a graph in Python

I have been playing around with the data stream from a raspberry pi on my garage roof which is streaming data to flightradar24. My object is to create an almost. real time graph of the altitudes of the aircraft tracked by the pi. I have successfully captured the data I want and can write it to a csv file ready to be read by matplotlib into animated graph. If I format the data into 2 columns, one for the x data and the other with the y data then it works fine.
However I want to move on from that. The plots on the graph need to be labeled with the aircraft flight number and also as one aircraft moves out of the field of view, another flys in. So I have reformatted my CSV to look like this

44,ZKTTC,7875,
45,ZKTTC,7875,
46,ZKTTC,7875,
47,ZKTTC,7875,
48,ANZ236L,2100,
49,ANZ236L,2100,
50,ZKTTC,7875,
51,ZKTTC,7875,
52,ZKTTC,7875,
The first number is a 1 sec counter used for the x axis, the second item is the flight number and the last is the altitude. I feel this is a more proper way to present the data.
However I don’t seem to be able to find any suggestions on the net as to how to approach this. All the examples seem to have 2 or more columns of data, one for the x axis and then separate columns for subsequent channels of y data. Can anyone help.
With thanks
Peter