Error when plotting

Please follow the instructions here to create an example that we can easily copy and run.