Merge plotting code from regs branch
Port the new tps-rpm to master