I am using the LineCollection library to get the colors of the lc variable in https://matplotlib.org/3.1.1/gallery/lines_bars_and_markers/multicolored_line.html based on the