Question on the subject of prepositions:

If referring to a prose text that is presented with numbered lines (for exam an extract prepared for an exam), would you say:

"In line 3, there is an example of a simile."

or

"On line 3, there is an example of a simile."