I had a similar problem where different parameters to be plotted need to have each line consistently identified by subject…