Updated code to do the efficiency plot