added libtiff and plotting