Minor changes to variable names and fixing of legend line colours in plot 4