How to use set_data () to draw a line between two points in the matplotlib of python

this statement can draw points by setting my_pointset_data (): my_point, = plt.plot ([], [], "bx", alpha=.5)
so I want to imitate this statement to realize the drawing of lines between two points:
my_line, = plt.plot ([,], [,], color="brown", linestyle="-")
or
my_line, = plt.plot ([[], []], [], []], Color="brown", linestyle="-")
but neither format is correct. How can I write the correct format?
python is version 3.6

Mar.02,2021

then get the answer on Stack Overflow. There is no difference between point and line initialization, so the correct format should be
my_line=plt.plot ([], [], color='brown', linestyle='-')

.
Menu