bugfix and start of peter plotting framework