modified the script to produce the discretisation example plot