converted plotTEslice to julia, almost working