Adding lines to a plot and error bars