syntax error in plot method