state diagram for plotter