Dynamic plot sizing. Fixed bugs in the logging.