f(x) = (x <0.5 ? 2*x : 2-2*x) plot [0:1] f(x) pause -1 "Hit return" plot [0:1] f(f(x)) pause -1 "Hit return" plot [0:1] f(f(f(x))) pause -1 "Hit return" plot [0:1] f(x)/2+f(f(x))/4+f(f(f(x)))/8