Added ability to plot motion codes