fix legend mismatch in draw.R