add event matrix and plotting