Implemented (not yet working) usage of command states in plot tool.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>