Start of backplot code.