Added usage of command state for wrapping in plot tool.

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