cross check cap plotting code