changed plot code to enable plotting of TIs by calcs