Fix plot for functions with multiple outputs.