Matplotlib plotting example for locomotive problem.